clear all for drog=1:60; syms cg1 cg2 cp1 cp2 x1 eqn1=cg1+cp1==0.05*drog; eqn2=cg2+cp2==0.15*drog; eqn3=cg1==(132.24/(0.082*298))*x1; eqn4=cg2==(132.24/(0.082*298))*(1-x1); eqn5=x1==(cp1/132.24)/((cp1/132.24)+(cp2/132.24)); s=solve(eqn1, eqn2, eqn3, eqn4, eqn5, cg1, cg2, cp1, cp2, x1) a=s.cp1; end
In every loop i want to keep the solution cp1 in a matrix, so that at the end of all the loops i will have the results in a single matrix. How can i do that? can you please help me???
Best Answer