MATLAB Answers

A question regarding fminunc

1 view (last 30 days)
antonet on 3 Apr 2013
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
Error using chol
Matrix must be positive definite.
in mvtrnd1 (line 21)
Error in proposed_emprirical_moodys_predict (line 315)
cdraw=mvtrnd1(tmean,tvcov,v); %proposal
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)
fminusub(funfcn,x, ...
Error in proposed_her (line 309)
Is there a way to change the settings in optimset to avoid having these two errors?


Sign in to comment.

Answers (0)

Sign in to answer this question.