solving unknown variables in matrices
Show older comments
So for un I've got to solve 3 variables from the equation y = k*x^2 + l*x + m, given are points P(-2, 4) Q(1,1) and R(2, -4). We are also instructed to use matrices.
I though a logical next step would be to make a matrix, matrix=[-2, 4;1, 1;2, -4]
From this you can make 3 linear equations, one for every row of the matrix. Is there a way to build and solve such an 'equation matrix' using Matlab? Or do I just have to do this by hand by treating it as a system of 3 coupled equations, which in this case isn't that difficult.
I've tried introducting the variables k, l and m into a matrix and making equations in there, but this hasnt worked.
Accepted Answer
More Answers (1)
Torsten
on 4 Jan 2019
1 vote
[4 -2 1; 1 1 1;4 2 1]*[k;l;m] = [4; 1; -4]
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!