On 14.03.13 18:18, pietro wrote: > Hi all, > > I have a symbolic system and I have to convert it in its matrix form. As example: > > a*x+b*y=2; > c*x+d*y=5; > > in > [a,b;c,d]*[x;y]=[2;5]; > > Is there anyway to perform that with matlab2012a? I know there is the function equationsToMatrix for the 2013a version, but unfortunately I don't have it. :(
You could try to make polynomial expressions from the equations with the ?children? function and then use ?quorem(lhs, x, x)? and ?quorem(lhs, y, y)? to get the vectors to combine into the matrix. Not really pretty, I know.