Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Using vpasovle to search along a line

1 回表示 (過去 30 日間)
Abdel Halloway
Abdel Halloway 2020 年 8 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
So I'm trying to solve a system of two variable equations (let's say x and y) over a varying parameter set using vpasolve. The equations are quite intricate and as such vpasolve frequently returns NaN or empty structures. However, I do know that the solutions generally reside along a fixed ratio s.t. where p ranges from 1 to 2.5. Can I specify this when using vpasolve? Is there any other way to go about this?

回答 (1 件)

John D'Errico
John D'Errico 2020 年 8 月 22 日
It sounds as if you know the solutions lie along a line, but you don't know the slope of that line, that x and y must be proportional to each other.
You really don't have variables x and y here then. Substitute for x as x = p*y.
This leaves you with two variables, p and y. You still have two equations, in the two unknowns. Once you solve them for p and y, you can then recover x. Since p and y solved the two equations, the recovered x and y will be solutions to the original equations.
  2 件のコメント
Abdel Halloway
Abdel Halloway 2020 年 8 月 22 日
Okay, so can I then restrict the range of p such that is only searches for p between 1 and 2.5?
Walter Roberson
Walter Roberson 2020 年 8 月 22 日
https://www.mathworks.com/help/symbolic/vpasolve.html#bt5sqi5-1-init_guess

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by