ming5819205 发表于 2008-6-2 23:55

概率密度 直方图

clear all
dt=0.1;
u=16.5;
k=0.005;
wu=3.14;
wl=0.00377;
dw=0.005236;

ss=888;
sss=999;
n=600;
t=0:0.1:59.9;
m=1:1:600;

w=wl+(m-1/2)*dw;
xx=600*w/(pi*u);
ss=2.*k.*u.*xx.^2/(w.*(1+xx.^2).^(4/3));
pp=sqrt(2*ss*dw);
mu=;
sigma=;
randn('seed',ss);
r=mvnrnd(mu,sigma,n);
a=r(:,1);
b=r(:,2);

r=w.*t;
x=a'.*cos(r)+b'.*sin(r);
%%%%%%%%%%概率密度
=ksdensity(x);
figure(1)
plot(xi,f);
% hist(xi,f)

为什么可以用plot(xi,f)画图,而hist(xi,f)出现这样的问题:

??? Edges vector must be monotonically non-decreasing.

ming5819205 发表于 2008-6-9 23:43

现在搞明白了, 觉得不是很难的
页: [1]
查看完整版本: 概率密度 直方图