I have a system of equations with 9 equations & 9 unknowns. When I try to use either the linsolve or solve functions, I get a warning that says "solution is not unique b/c the system is rank-deficient". I have tried using the 'null' function to get around this, but it isn't helping (I'm not sure I'm doing it correctly, either). I have also tried using A\B without success.
The warning I receive is:
Warning: Solution is not unique because the system is rank-deficient.
> In symengine
In sym/privBinaryOp (line 991)
In sym/linsolve (line 63)
In Roberta_epNdIsoPlot (line 154)
I have listed my code below, and the result I get looks like this:
X =
87210399887576469606093503332352/4079960882434046875
0
0
0
0
0
0
0
0
If somebody could please help me figure out where I'm going wrong or how to get the null function to work properly I would be forever grateful. Thank you so much.
syms p1 p2 p3 p4 p5 p6 p7 p8 p9 % assigns these as symbols so they can be used as variables in the system of equations
eqn1 = p1 == (Lit_IsoSr(1) - ((pOpx .* p2) + (pCpx .* p3) + (pBt .* p4)... + (pPl .* p5) + (pKfs .* p6) + (pQtz .* p7) + (pMt .* p8) + (pIl .* p9))) ./ pFl;eqn2 = p2 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pCpx .* p3) + (pBt .* p4)... + (pPl .* p5) + (pKfs .* p6) + (pQtz .* p7) + (pMt .* p8) + (pIl .* p9))) ./ pOpx);eqn3 = p3 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pBt .* p4)... + (pPl .* p5) + (pKfs .* p6) + (pQtz .* p7) + (pMt .* p8) + (pIl .* p9))) ./ pCpx);eqn4 = p4 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pCpx .* p3)... + (pPl .* p5) + (pKfs .* p6) + (pQtz .* p7) + (pMt .* p8) + (pIl .* p9))) ./ pBt);eqn5 = p5 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pCpx .* p3)... + (pBt .* p4) + (pKfs .* p6) + (pQtz .* p7) + (pMt .* p8) + (pIl .* p9))) ./ pPl);eqn6 = p6 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pCpx .* p3)... + (pBt .* p4) + (pPl .* p5) + (pQtz .* p7) + (pMt .* p8) + (pIl .* p9))) ./ pKfs);eqn7 = p7 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pCpx .* p3)... + (pBt .* p4) + (pPl .* p5) + (pKfs .* p6) + (pMt .* p8) + (pIl .* p9))) ./ pQtz);eqn8 = p8 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pCpx .* p3)... + (pBt .* p4) + (pPl .* p5) + (pKfs .* p6) + (pQtz .* p7) + (pIl .* p9))) ./ pMt);eqn9 = p9 == ((Lit_IsoSr(1) - ((pFl .* p1) + (pOpx .* p2) + (pCpx .* p3)... + (pBt .* p4) + (pPl .* p5) + (pKfs .* p6) + (pQtz .* p7) + (pMt .* p8))) ./ pIl);% below code uses the 'equationsToMatrix' function to convert sys of eqns
% into a solveable matrix of form AX = B
[A, B] = equationsToMatrix([eqn1, eqn2, eqn3, eqn4, eqn5, eqn6, eqn7, eqn8, eqn9],... [p1, p2, p3, p4, p5, p6, p7, p8, p9]);X = linsolve(A, B)
Best Answer