How do I solve for two unknowns in this matrix?
Ältere Kommentare anzeigen
I've defined C and D previously and E and F are my unknowns. My code is
A = equationsToMatrix([C, D], [F, G]);
B = [ ];
X = linsolve(A,B);
result = double(X);
I know AX=B but in this case I don't know how to code B if it is to be the constants in the two equations C and D.
For example, if C = 0.011F-0.101G-0.555 and D=-0.028F-0.003G-0.055, Matrix A is [0.011, 0.101; -0.028, -0.003]. How do I get B to be [0.555; 0.055]?
Also, I'd rather not manually enter the values into B.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Environment and Clutter finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!