finding values of a b c d

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 Comment

Stephen23
Stephen23 on 6 Feb 2018
Edited: Stephen23 on 6 Feb 2018
It is not required to use slow and complex symbolic operations. See Andrei Bobrov's answer for the fast, efficient, and simple numeric solution.

Sign in to comment.

 Accepted Answer

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 Comments

hi, it does not work when i put it in matlab. I am supposed to find the matrix first which is M = [2 3 9 1; 2 2 -8 5; -7 -5 1 3; -2 6 -4 -1]. Then use this M and other w x y z to find out the value of a b c d. but i dont know how to do the second part. Can you please help!
Birdman
Birdman on 6 Feb 2018
Edited: Birdman on 6 Feb 2018
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.
Yes Thank you!

Sign in to comment.

More Answers (1)

A = [2 2 -7 -2
3 2 -5 6
9 -8 1 -4
1 5 3 -1];
b = [5;-17;14;9]
abcd = A\b;

Categories

Tags

Asked:

on 6 Feb 2018

Edited:

on 6 Feb 2018

Community Treasure Hunt

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

Start Hunting!