Solve an equation, answer not solved

1 回表示 (過去 30 日間)
Hubert Coppieters 't Wallant
Hubert Coppieters 't Wallant 2020 年 10 月 19 日
コメント済み: Ameer Hamza 2020 年 10 月 19 日
I try to solve an equation but it keeps giving me long strings of operations (addition, multiplication, roots, etc...) with many digits numbers, did I do something wrong?
here is my code:
syms deltax
eqn = - (50) * (2 * sqrt(deltax^2 + (1/2)^2) - 1)^2 + (1/2)* 0.025 * 100 + deltax * (0.025 * 9.81*sin(pi*(1/8))+0.1*9.81*cos(pi*(1/8)))==0;
wortels = solve(eqn, deltax, 'Real', true)

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 10 月 19 日
It is giving you symbolic solution. You are probably looking for a numeric solution. Use vpa() or double()
syms deltax
eqn = - (50) * (2 * sqrt(deltax^2 + (1/2)^2) - 1)^2 + (1/2)* 0.025 * 100 + deltax * (0.025 * 9.81*sin(pi*(1/8))+0.1*9.81*cos(pi*(1/8)))==0;
wortels = solve(eqn, deltax, 'Real', true);
wortels = double(wortels);
  2 件のコメント
Hubert Coppieters 't Wallant
Hubert Coppieters 't Wallant 2020 年 10 月 19 日
A thousand thanks to you!
Ameer Hamza
Ameer Hamza 2020 年 10 月 19 日
I am glad to be of help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by