Solving a system of linear equations with lots of o coefficients.

조회 수: 1 (최근 30일)
Emily Pierce
Emily Pierce 2022년 5월 18일
답변: Bjorn Gustavsson 2022년 5월 18일
I have a matrix system of linear equations that look somthing like this were u is a vector of 7 unknowns
I have tried useing linsolve to solve this but My solution is coming out as 0. I am unsue how to fix this.
Thank you for your time and help!
12 8 0 0 0 0 0
-4 12 8 0 0 0 0
0 -4 12 8 0 0 0 (u) =
0 0 -4 12 8 0 0
0 0 0 -4 12 8 0
0 0 0 0 -4 12 8
0 0 0 0 0 -4 12
12
0.7
0.4
1
1.2
1,7
-25

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2022년 5월 18일
Matlab is designed to solve systems of linear equations. It is one of the fundamental operators of its matrix-algebra:
% Your problem is
% u = M*x;
% that has a solution:
x = M\u;
% Check #1:
M*x - u
% Check #2:
[U,S,V] = svd(M);
disp(diag(S))
Since you ask this question this way I deduce that you are reasonably new working with matlab. If that conclusion is close enough to correct, then you might consider browsing through the onramp material, it is an overview-introduction type presentation/course thing that is designed to get you up to speed ASAP. My understanding is that if you go through the parts you find relevant there and then browse/look through the help and documentation on things you'll get up to speed faster than by any other method.
HTH

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by