Help solving systems of linear equations
Ältere Kommentare anzeigen
I am trying to write a code to properly charge balance chemical reactions (complex redox reactions), and have run into some math issues. I am starting with a simple equation that I know the solution for:
I am trying to solve the equation Ax=B for the matrix A=[3 0 -2;4 2 -3;-1 4 0] when B=[0;0;0], the solution I am looking for is x=[4;1;6]. However, when I try to solve for x using x=A\B I get the following warning "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 9.462128e-19." and the solution I get is x=[0;0;0].
How do I get a nonzero solution for my A matrix?
Thanks
1 Kommentar
Jesse Walters
am 25 Jul. 2018
Bearbeitet: Jesse Walters
am 25 Jul. 2018
Antworten (0)
Kategorien
Mehr zu Mathematics 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!