필터 지우기
필터 지우기

How to remove message from fsolve result

조회 수: 41 (최근 30일)
Zulhash Uddin
Zulhash Uddin 2011년 3월 6일
댓글: Walter Roberson 2023년 2월 26일
%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

채택된 답변

the cyclist
the cyclist 2011년 3월 6일
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
Zulhash Uddin
Zulhash Uddin 2011년 3월 6일
I have used "option" in the call to fsolve, please see the code above
the cyclist
the cyclist 2011년 3월 6일
No, you defined the variable "options". You did not include it in your call to fsolve.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Oleg Komarov
Oleg Komarov 2011년 3월 6일
Then include options in the call to fsolve:
x = fsolve(f,[0.001 0.001],options)
Oleg

Fazlollah
Fazlollah 2023년 2월 25일
use this line of code for fsolve options
options = optimset('Display','off');
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 2월 26일
The original poster was already doing that. The problem was that they were not passing the options to fmincon.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by