My aim is to solve 10 equations and with 10 variables and 3 parameters. So, ultimately, I need the 10 variables solved in terms of the other 3 parameters.
These are the 10 variables whose values are to be found and the three parameters are K1,K2,K3
syms cPZ cHP cPZHP cPZCOOM cCO2 cMOOCPZCOOM cPHPZCOOM cCO32M cHCO3M cOHM K1 K2 K3;
eq1='K1 = cPZ*cHP/cPZHP';
eq2='K2 = cPZCOOM*cHP/(cPZ*cCO2)';
eq3='K3 = cMOOCPZCOOM*cHP/(cPZCOOM*cCO2)';
eq8='cPZt = cPZ + cPZHP + cPZCOOM + cPHPZCOOM + cMOOCPZCOOM';
eq9='cHP = cPZCOOM + 2*cMOOCPZCOOM + cHCO3M + 2*cCO32M + cOHM - cPZHP';
eq10='cCO2t = cCO2 + cHCO3M + cCO32M + cPZCOOM + cPHPZCOOM + 2*cMOOCPZCOOM';
as = solve(eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,'cPZ','cHP','cPZHP','cPZCOOM','cCO2','cMOOCPZCOOM','cPHPZCOOM','cCO32M','cHCO3M','cOHM')
This is my code. When I try to run this, I get something called Mupad Internal Error(4 times) which says MCM_Compare_Unknown. And later on, I also get a warning: Explicit solution could not be found. I suspect the error to be in the eq4,eq5,eq6,eq7 because until I changed these four lines, this error was not popping up. I have never seen this error earlier in Matlab. Please help me with it.