clc;clear
y=ln(y)
Std=std(y) %標準差
[F,XI]=ksdensity(y)
figure(1)
plot(XI,F,'o-')
x =randn(300000,1);
figure(2)
[f,xi] = ksdensity(x);
plot(xi,f);
畫出概率分布圖
ksdensity -------------------- Kernel smoothing density estimation.
表示核平滑密度估計