finding values of a b c d
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi, Can anyone help me with this. I have no idea how to find the value of a b c d. PLEASE LOOK AT THE PICTURE! THANKS!
댓글 수: 1
채택된 답변
Birdman
2018년 2월 6일
syms a b c d
eq=[5;-17;14;9]==[2 2 -7 2;3 2 -5 6;9 -8 1 -4;1 5 3 -1]*[a;b;c;d]
sol=solve(eq)
a=vpa(sol.a,4)
b=vpa(sol.b,4)
c=vpa(sol.c,4)
d=vpa(sol.d,4)
댓글 수: 3
Birdman
2018년 2월 6일
편집: Birdman
2018년 2월 6일
Well, other way around is to take inverse of the matrix as stated in question and do the following:
syms a b c d
sol=[a;b;c;d]==vpa(inv([2 2 -7 2;3 2 -5 6;9 -8 1 -4;1 5 3 -1])*[5;-17;14;9],4)
By the way, it should work without an error if you have Symbolic Toolbox.
Or, just simply:
inv([2 2 -7 2;3 2 -5 6;9 -8 1 -4;1 5 3 -1])*[5;-17;14;9]
will give you a,b,c and d respectively.
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!