Error using optimset (line 214) Unrecognized parameter name 'NonlEqnAlgorithm'.

Hi,
I have the following piece of Matlab 2008a code:
fcn = @(x)objfcn(x, Recovery, DiscountFactors, Tenors) - Spreads; % start with PDs equal to 50% RNPD = fsolve(fcn, 0.5 .* ones(1, length(Tenors)), optimset('Display', 'off', 'NonlEqnAlgorithm', 'lm'));
I am trying to run this in Matlab 2014a, but I get the following error:
Error using optimset (line 214) Unrecognized parameter name 'NonlEqnAlgorithm'.
Could you please help me resolve this error as I am new to Matlab?

답변 (1개)

Remove the 'NonlEqnAlgorithm' argument, as it makes no sense:
fsolve(fcn, 0.5 .* ones(1, length(Tenors)), optimset('Display', 'off'));
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

도움말 센터File Exchange에서 Optimization에 대해 자세히 알아보기

질문:

2014년 10월 22일

답변:

2014년 10월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by