Did the Matlab solver make a mistake?

4 ビュー (過去 30 日間)
Karl
Karl 2025 年 2 月 14 日
編集済み: Torsten 2025 年 2 月 14 日
I fed this equation into the Matlab terminal:
syms y v w i s
eqn = y/s-i/s == (y^2*w^2/v^2-w^2)^(1/2)
eqn = 
sol = solve(eqn, y)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
sol = 
sol1 = solve(eqn, y, 'returnconditions', true)
sol1 = struct with fields:
y: [2x1 sym] parameters: [1x0 sym] conditions: [2x1 sym]
sol1.y
ans = 
sol1.conditions
ans = 
and got these two solutions, the two intersection points of a hyperbola with a straight line:
-(v*(i*v + s*w*(i^2 + s^2*w^2 - v^2)^(1/2)))/(s^2*w^2 - v^2)
-(v*(i*v - s*w*(i^2 + s^2*w^2 - v^2)^(1/2)))/(s^2*w^2 - v^2)
the first solution did the trick but the second only after I removed the minus sign at it's beginning - that's besides the next minus sign that replaces the plus in the first solution
a big thank you for all the support I received from you in the past

回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by