A question regarding fminunc

조회 수: 1 (최근 30일)
antonet
antonet 2013년 4월 3일
Dear all,
I use the function fminunc having specified the components of optimset; that is;
x00=cc; options=optimset('LargeScale','off','display','off','TolFun',0.0001,'TolX',0.0001,...
'GradObj','off', 'Hessian','off','DerivativeCheck','off');
[xxx,,H]=fminunc('CES_mode7cut',x00,options,... X1,delta,rlaggedvector,repphi1,fff2,fff3,fff4,fff5,fff6,varepsilon);
tmean = xxx; %
tvcov = c*inv(H);
cdraw=mvtrnd1(tmean,tvcov,v); %proposal density
My problem is that the code gets stuck either at
mvtrnd1(tmean,tvcov,v);
Error using chol
Matrix must be positive definite.
in mvtrnd1 (line 21)
L=chol(vcov)';
Error in proposed_emprirical_moodys_predict (line 315)
cdraw=mvtrnd1(tmean,tvcov,v); %proposal
density
or I get this message
Error using fminusub (line 17)
Objective function is undefined at initial point.
Fminunc cannot continue.
Error in fminunc (line 403)
[x,FVAL,GRAD,HESSIAN,EXITFLAG,OUTPUT] =
fminusub(funfcn,x, ...
Error in proposed_her (line 309)
[xxx,H]=fminunc('CES_mode7cut',x00,options,...
Is there a way to change the settings in optimset to avoid having these two errors?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by