why I get imaginary part using solve function
古いコメントを表示
I am trying to use the solve function but somehow I keep getting more than one answer with imaginary parts and negative numbers

the correct answer should be the second answer = 0.85
1 件のコメント
If you multiply eq4 by (1+y*m4^2)^2, you get a polynomial equation of degree 4 in m4. This equation has 4 zeros (which are listed in the output of vpasolve). Two of them are purely imaginary, two of them are real. One of the solution is the one you want (the second one).
採用された回答
その他の回答 (1 件)
David Hill
2022 年 6 月 14 日
y=1.4;
to3=300;
t_star=400;
eq4=@(m4)(((2*(y+1)*m4^2*(1+(y-1)/2)*m4^2))/(1+y*m4^2)^2)-to3/t_star;
m_4=fzero(eq4,.8)
カテゴリ
ヘルプ センター および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
