Solving equations using solve() function

조회 수: 21 (최근 30일)
AAKASH R AAKASH R
AAKASH R AAKASH R 2017년 10월 5일
댓글: AAKASH R AAKASH R 2017년 10월 5일
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일
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개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by