using fsolve for real answers

i use fsolve to solve a set of nonlinear equations with two variables, i want real, not, complex answers for initial conditions that i give.
how can i do this, because almost the answers are complex.

답변 (2개)

Sean de Wolski
Sean de Wolski 2011년 4월 21일

0 개 추천

doc real

댓글 수: 1

mona faraji
mona faraji 2011년 4월 25일
thanks for your answer, what do you mean by doc real?

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

Steve Grikschat
Steve Grikschat 2011년 4월 21일

0 개 추천

fsolve (and all other functions in the Optimization Toolbox) are not supposed to work with complex data. You need to make sure that your system only returns real data.
If you have imaginary components to your system, then do as Sean suggested and remove them using real, to solve the problem in the real domain.

카테고리

도움말 센터File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기

질문:

2011년 4월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by