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 CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by