Solving equations using solve() function

The code below gives an empty Ans although it is clear that the solution is 0,0,0,0.
syms a b c d
res = solve(a+b,a+b+c,a+b+c+d,a)
Hence why do we get an empty answer?

 採用された回答

Torsten
Torsten 2017 年 10 月 5 日

0 投票

sol = solve([a+b==0,a+b+c==0,a+b+c+d==0,a==0],[a b c d]);
sol.a
sol.b
sol.c
sol.d
Best wishes
Torsten.

1 件のコメント

AAKASH R AAKASH R
AAKASH R AAKASH R 2017 年 10 月 5 日
Thanks a lot, I didn't know that a square bracket would make all the difference.

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

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by