Quantcast
Channel: MATLAB Central Newsreader - tag:"optimization"
Viewing all articles
Browse latest Browse all 130

Return additional output in optimization

$
0
0
I want to optimize p from testfun(). However I want to return additional output variable (b) from the optimization.

Function [p, b] = testfun()

x = fmincon(@testfun, x0,options)

where b is the additional variable passed to fsolve, I am looking to achieve something like this,
[x,b] = fmincon(x0,options)

How can I do that?

Thx
Nana

Viewing all articles
Browse latest Browse all 130

Trending Articles