ploting optimization of parameters from lsqcurvefit
Show older comments
I am using lsqcurvefit to optimize 8 parameters. Using
'Plotfcns',{@optimplotx}
I am able to generate a barplot which plays as a movie changing with the iterations and ends with the value for each of my parameters. The x-axis is number of variables (8 for the # of parameters) and y-axis as current value. I would like to be able to plot each parameter as it optimizes over time such that the x-axis is # of iterations and y-axis is parameter value. Ideally I would like 8 different lines on this plot for each of my 8 parameters instead of 8 separate plots. I would also like to be able to export these values to a text document. Any ideas on how to do this would be great! Thanks!
Answers (1)
Alan Weiss
on 12 Nov 2015
0 votes
You can use an output function to keep a history of your variables. This output function (in a slightly different syntax) keeps such a history. You can plot as the function progresses, and store the results for later use.
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!