如何使用matlab编写对数正态分布

时间:2014-06-07 15:52:08

标签: matlab

我正面临这个问题。

Error using lognfit (line 52)
The data in X must be positive.
Error in testing (line 173)
        [a(i-100,j) b(i-100,j)] = lognfit(x);

我的代码如下:

for i = 101:401
    for j = 1:37
        x  = Gco(i-100:i,j).';
        [f,xv] = ecdf(x);
        [a(i-100,j) b(i-100,j)] = lognfit(x); % a is mu and b is sigma

0 个答案:

没有答案