Can't solve equations - logical 0
古いコメントを表示
Hello everyone!
I have a problem with trying to solve equations in matlab r2017b:
Here's the code:
close all, clear all, clc
syms x
eq = x^2 == 9;
solx = solve(eq, x)
Unfortunately, matlab understands the line x^2 == 9 to be a statement logically equal to zero, so matlab understands my code to mean: solve(0,x)
Which obviously has no solution.
Any help will be appreciated
3 件のコメント
KSSV
2018 年 3 月 22 日
r2017a:
solx =
-3
3
Asger Jon Vistisen
2018 年 3 月 22 日
Birdman
2018 年 3 月 22 日
Check my answer.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!