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 个)
Alan Weiss
2014-10-22
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!