Applying fminsearch on one SCALAR output of a VECTOR function. How can I get other corresponding outputs w/o recomputing my function?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi
fminsearch finds the minimum of a SCALAR function of several variables.
I have a VECTOR function. [output1, output2] = myfun(x), where output1 is a SCALAR. It takes a while to run my function.
I am running: [x] = fminsearch( @(x) myfun(x) , 0) which finds the x that minimises output1.
Question: is there a way of retrieving output2 without having to rerun myfun?
Thank you.
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!