lsqcurvefit error on a different computer
이전 댓글 표시
I tried to use lsqcurvefit to fit gamma variate function. It runs ok on my mac laptop with Matlab2015a installed, although it's really slow since that laptop only have two cores and I have 630784 pairs of data to fit. So, I decided to use a more powerful computer to run it at full speed (4 core). This is a Windows computer with Matlab2015b installed, the code ran successfully for about 20 min then it gave errors as shown below. I don't know why it runs fine on my laptop and failed on a different platform after it ran 20 mins. Any ideas? Thanks!
gma_var =@(x,xdata,varargin) x(1)*((xdata-x(2)).^x(3)).*exp(-(xdata-x(2))./x(4))...
.*(exp(1)/(x(3)*x(4))).^(x(3))+x(5);
parfor i = 1:num
gamma_fit(:,i) = lsqcurvefit(gma_var,k_reshaped(i,:),t,perfusion4D_reshaped(i,:))';
end
k_reshaped is a 333036x5 matrix and perfusion4D_reshaped is a 333036x29 matrix
Error using trust (line 29)
Input to EIG must not contain NaN or Inf.
Error in trdog (line 109)
[st,qpval,po,fcnt,lambda] = trust(rhs,MM,delta);
Error in snls (line 311)
[sx,snod,qp,posdef,pcgit,Z] = trdog(x,g,A,D,delta,dv,...
Error in lsqncommon (line 156)
snls(funfcn,xC,lb,ub,flags.verbosity,options,defaultopt,initVals.F,initVals.J,caller,
...
Error in lsqcurvefit (line 254)
lsqncommon(funfcn,xCurrent,lb,ub,options,defaultopt,caller,...
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!