How to remove text from fsolve result
Mostrar comentarios más antiguos
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
Respuestas (3)
Paulo Silva
el 6 de Mzo. de 2011
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 comentarios
Zulhash Uddin
el 6 de Mzo. de 2011
Pedro Miguel Trula
el 15 de Feb. de 2018
It worked for me! Thank you
Joy
el 26 de Dic. de 2023
Thanks, It worked for too.
Walter Roberson
el 6 de Mzo. de 2011
1 voto
4 comentarios
Zulhash Uddin
el 6 de Mzo. de 2011
Walter Roberson
el 6 de Mzo. de 2011
Are you passing the options to fsolve() ? Please show your current code.
Zulhash Uddin
el 6 de Mzo. de 2011
Walter Roberson
el 6 de Mzo. de 2011
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
el 6 de Mzo. de 2011
0 votos
Your code doesn't return any text, it just sends a message to the command line and puts the result in the variable x.
1 comentario
Zulhash Uddin
el 6 de Mzo. de 2011
Categorías
Más información sobre Common Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!