Do I need to reset Fsolve Parameters if I use Fsolve twice in my code ?
5 ビュー (過去 30 日間)
古いコメントを表示
Hi All
If I have to use Fsolve twice in my code, do I need to reset any paramter ?
[x,fval,exitflag,output] = fsolve(fun,x0initial,options);
8 件のコメント
dpb
2019 年 7 月 6 日
Well, again, all we see is what you post...
So, is the Q? closed? Or is there still some issue?
採用された回答
Walter Roberson
2019 年 7 月 6 日
No. However if you do not change any of the parameters and the function does not involve random variables, then the second call would give the same result as the first call.
fsolve does not modify any of the input parameters.
I do sometimes see people using code such as
x = [0,10]
x = fzero(SomeFunction, x0, x);
and then get surprised when they try to use x as if it were still the vector instead of having been replaced with the specific solution.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!