ploting optimization of parameters from lsqcurvefit
이전 댓글 표시
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!
답변 (1개)
Alan Weiss
2015년 11월 12일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!