How to remove message from fsolve result
41 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zulhash Uddin
el 6 de Mzo. de 2011
Comentada: Walter Roberson
el 26 de Feb. de 2023
%Following code giving results with message
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])
%Results and message 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.
x =
1.7125 1.7556
0 comentarios
Respuesta aceptada
the cyclist
el 6 de Mzo. de 2011
I think the issue is that you have not actual used "options" in the call to fsolve, so it is using the default options (including display being on).
2 comentarios
the cyclist
el 6 de Mzo. de 2011
No, you defined the variable "options". You did not include it in your call to fsolve.
Más respuestas (2)
Oleg Komarov
el 6 de Mzo. de 2011
Then include options in the call to fsolve:
x = fsolve(f,[0.001 0.001],options)
Oleg
0 comentarios
Fazlollah
el 25 de Feb. de 2023
use this line of code for fsolve options
options = optimset('Display','off');
1 comentario
Walter Roberson
el 26 de Feb. de 2023
The original poster was already doing that. The problem was that they were not passing the options to fmincon.
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!