Hello,
I have two equations, one with known parameters and one with unknown. I would like to ask for a simple way to solve the system that equates the parameters for the two equations
e.g.eq. 1 = (a2 - a1 - a3 + 1)*x1 + (2*a1 - a2 - 3)*x2 + (3 - a1)*x3eq. 2 = 0.957*x1 - 0.253*x2 + 0.119*x3
Of course in this simple case it is easy to see that a1=2.043, a2=1.339 and a3=0.177.
One manual way that I have found to work is to create two sym vectors that v1 and v2 that contain the parameters of x1,x2 and x3 and then use the solve function
p=solve(y==b)
However this method solves the solution into a structure p.a1, p.a2 and p.a3 which is not convient (I would like to have it a vector) And second I have to manually create the sym vectors v1 and v2 which again is not convenient when I have to repeat the same thing for different equations of different orders.
Any ideas to work around this problem?
thank you in advance
Best Answer