How to remove text from fsolve result
古いコメントを表示
clc
clear all
f=@(x)[3*x(1)^3+x(1)^2-18; x(2)^3-5*x(2)^2+10];
x = fsolve(f,[0.001 0.001])
%RESULT as FOLLOWS
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
<stopping criteria details>
x =
1.71252757489359 1.75564007603342
回答 (3 件)
Paulo Silva
2011 年 3 月 6 日
clc
clear
options = optimset('Display','off');
f=@(x)[3*x(1)^3+x(1)^2-18; x(2)^3-5*x(2)^2+10];
x = fsolve(f,[0.001 0.001],options)
3 件のコメント
Zulhash Uddin
2011 年 3 月 6 日
Pedro Miguel Trula
2018 年 2 月 15 日
It worked for me! Thank you
Joy
2023 年 12 月 26 日
Thanks, It worked for too.
Walter Roberson
2011 年 3 月 6 日
1 投票
4 件のコメント
Zulhash Uddin
2011 年 3 月 6 日
Walter Roberson
2011 年 3 月 6 日
Are you passing the options to fsolve() ? Please show your current code.
Zulhash Uddin
2011 年 3 月 6 日
Walter Roberson
2011 年 3 月 6 日
That does not pass the options to fsolve. Look again at Paulo's answer: he provides options as the third parameter to fsolve().
Paulo Silva
2011 年 3 月 6 日
0 投票
Your code doesn't return any text, it just sends a message to the command line and puts the result in the variable x.
カテゴリ
ヘルプ センター および File Exchange で Common Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!