How to solve an equation with a vector as unknown?

5 ビュー (過去 30 日間)
Lu Da Silva
Lu Da Silva 2021 年 11 月 14 日
回答済み: Lu Da Silva 2021 年 11 月 14 日
I have the following equation:
M = X * sqrt((X-A)^2 + B^2)
A and B are constants but M is a vector containing 100 values. I'm trying to find the corresponding 100 values for X.
I tried using vpasolve but I get the error "More equations than variables is only supported for polynomial systems."

採用された回答

Lu Da Silva
Lu Da Silva 2021 年 11 月 14 日
I solved it with this code:
syms X
eqn = M == X * sqrt((X-A)^2 + B^2);
sol = arrayfun(@vpasolve,eqn,'uniform',0);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by