How to stop message in command window
显示 更早的评论
Hi
When I use lsqcurvefit function I get the following msg in command window. Since in my program no. of iteration is so high that, I believe it eats up huge chunk of memory. Can i stop this msg to display??
-------------------------
>>[x,resnorm] = lsqcurvefit(@myfun,x0,xdata,ydata);
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to its initial value is less than the default value of the function tolerance.
-----------------------
采纳的回答
更多回答(2 个)
Jan
2012-11-28
0 个投票
This message is an important warning that something might going wrong. I would never disable such warnings. Do you have a really good reason to suppress it?
4 个评论
strunack
2012-11-28
Jan
2012-11-28
Why does displaying a message consume memory?
If you want to see a specific output, write it to a GUI or in a file.
strunack
2012-11-28
Walter Roberson
2013-1-4
Displaying the message would use up memory only in the scrollable command window. You can adjust the amount of output that is saved for scroll-back. If you have it set to (say) 25000 lines, then when the 25001's line arrives for output, the old line 1 is deleted, the rest moved up (2 to 1, 3 to 2 and so on) and the new line would become the new 25000'th line. The amount of memory would thus be limited.
Taking up time is going to be more of a problem than taking up memory
类别
在 帮助中心 和 File Exchange 中查找有关 Nonlinear Least Squares (Curve Fitting) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!