How do i find x in an equation using the solve command?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone,
I use MATLAB R2015a.
Can't solve a x in the matlab even for the simpliest equation like x-2=0. tryed everything.
thank you for your help.
1 件のコメント
Darshan Sen
2019 年 11 月 22 日
Hello Shimon. What error are you getting? Do you have the Symbolic Math Toolbox add-on?
Here's a thread you might find useful. :)
採用された回答
Darshan Sen
2019 年 11 月 22 日
Once you have the Symbolic Math Toolbox add-on, you may solve the equation like this
syms x
eqn = x - 2 == 0;
solx = solve(eqn, x)
Hope this helps. :)
0 件のコメント
その他の回答 (1 件)
Erivelton Gualter
2019 年 11 月 22 日
Do you have Symbolic Math Toolbox?
Try the following:
syms x
fcn = x-2;
solve(fcn == 0)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!