How to solve the AX=0, When some of the elements in matrix X is known.
54 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
JITHA K R
am 11 Jan. 2018
Kommentiert: Luke Pretzie
am 2 Sep. 2019
I have to solve for X. Equation is AX=0. A MATRIX is a square matrix and in X matrix some of the elements are known some are unknowns. I want to get the unknowns. Can someone help me?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Fadhel Alsaffar
am 3 Feb. 2019
I tried the code above with my matrix but it did not work
A=[0.6485 -1 0;-1 2.4728 -2;0 -2 4.2970];%dummy data
syms x1 x2
X=[x1;x2;1];
eq=A*X==0;
solx=solve(eq);
x1=solx.x1
x2=solx.x2
Do you know what the problem with my code?
1 Kommentar
Luke Pretzie
am 2 Sep. 2019
Did your code give you an error message? Or did it show no output, or it showed x1 and x2 as "structs"? You can convert your structs to floats using the double() function:
x1 = double(solx.x1)
x2 = double(solx.x2)
That's assuming, of course, that everyone else went right and you didn't get an error message. If you did, please let me know what it was. If not, let me know if my suggestion helped.
Siehe auch
Kategorien
Mehr zu Linear Algebra 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!