how do i solve matrix error dimensions here
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
pejhan stiff
am 2 Jan. 2021
Beantwortet: Image Analyst
am 2 Jan. 2021
Hello
Can anyone help me with this code
I don't know what's wrong about it, or how can i solve it.
I want to find P in this question
and this is my code
k=-0.8146;T=0.1268;
M = [k, T, 0, 0 ;
T, k, T, 0 ;
0, T, k, T ;
0, 0, T, -0.6878];
J=[-4126.78;-3365.98;-3215.98;-3365.98];
J/M
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Jan. 2021
Try this:
k=-0.8146;
T=0.1268;
M = [k, T, 0, 0 ;
T, k, T, 0 ;
0, T, k, T ;
0, 0, T, -0.6878]
J = [-4126.78;-3365.98;-3215.98;-3365.98]
p = inv(M) * J
% Double check
pVerify = M * p % Should equal J or be very very close.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!