非線形方程式の解法で虚数解が出ないようにする方法

조회 수: 2 (최근 30일)
Kohei
Kohei 2019년 5월 21일
답변: Etsuo Maeda 2019년 5월 27일
2変数の非線形連立方程式を解く為,fsolveやlsqnonlinを使用しようと考えているのですが,解に虚数解が出てきてしまいます.
虚数解が出ないように制約条件を付けることは可能でしょうか?
方法を知っている方がいましたら教えて頂きたいです.
  댓글 수: 1
Image Analyst
Image Analyst 2019년 5월 22일
Google Translation Japanese to English:
I'm thinking of using fsolve or lsqnonlin to solve a nonlinear simultaneous system of two variables, but an imaginary solution will appear in the solution.
Is it possible to add constraints so that there are no imaginary solutions?
I would like to know if you know how.

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

답변 (1개)

Etsuo Maeda
Etsuo Maeda 2019년 5월 27일
fsolveとlsqnonlinには、解を実数に制限するオプションは無かったはずですので、Symbolic Math Toolboxを使って
syms x
vpasolve(x^8 - x^2 == 3, x, [-Inf Inf])
のようにして実数解に制限する方法はどうでしょうか。
assume(x, 'real')
もよいかと思います。
HTH

카테고리

Help CenterFile Exchange에서 方程式の解法에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!