我正面临这个问题。
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