Inverse of matrix multiplied by vector

12 views (last 30 days)
Mohamed Amine Mouajib
Mohamed Amine Mouajib on 15 Dec 2021
Edited: Jan on 15 Dec 2021
So I have this matrix
K = [ 168.57 4296.29 7250
0 998888.89 241666.67
0 0 1063333.33]
And this vector :
P = [ 0
-3456
3456]
I need to compute U = K^-1 * P

Answers (1)

Jan
Jan on 15 Dec 2021
Edited: Jan on 15 Dec 2021
K = [ 168.57 4296.29 7250; ...
0 998888.89 241666.67; ...
0 0 1063333.33];
P = [0; -3456; 3456];
u = K^-1 * P % Exactly what you have written already
u = 3×1
-0.0316 -0.0042 0.0033
u = inv(K) * P
u = 3×1
-0.0316 -0.0042 0.0033
u = K \ P % This is the fastest and most accurate method
u = 3×1
-0.0316 -0.0042 0.0033

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products


Release

R2015a

Community Treasure Hunt

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

Start Hunting!