Error 'Assignment has more non-singleton rhs dimensions than non-singleton subscripts'
이전 댓글 표시
Hi, I'm getting following errors while using mle with a custom pdf:
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
Error in fminsearch (line 200) fv(:,1) = funfcn(x,varargin{:});
Error in mlecustom (line 184) fminsearch(llf,start,opts,uncensData,censData,uncensFreq,censFreq,fun1Args,fun2Args,checkFunVals,lb,ub);
Error in mle (line 237) phat = mlecustom(data,varargin{:});
Error in mleexample (line 58) mle(DT,'pdf',pdf,'start',start);
MY SCRIPT:
pdf=@(x,a,b)h(x,a,b);
mi=0.3;
sigma=0.2;
start=[mi,sigma];
mle(DT,'pdf',pdf,'start',start);
function s=h(x,a,b)
k=a^2/b;
phi=b/a;
i=0;
s=ones(1,length(x));
while i<=29
s=s.*(x.^(k-1).*(exp(1).^(-x./phi))/(gamma(k)*phi^k));
i=i+1;
end
end
Can somebody help? Thank you very much.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!