Lets say I have a set of X equations with Y>X symbolic variables defining relations between several dependent and independent variables:
syms a b c d eeq1 = a + 3*c == b*2 - 5*e - d;eq2 = b - 2*a == e;eq3 = d - 2*b == 10*a - e;
I want to be able to solve for a in terms of b,c,d; hence eliminating e from these equations.
When I do:
solve(eq1,eq2,eq3)
It returns:
struct with fields: c: [1×1 sym] d: [1×1 sym] e: [1×1 sym]
I have tried:
solve(eq1,eq2,eq3,a)
But it gives an empty symbol:
Empty sym: 0-by-1
But from the equations above, it is clear that a could be described solely in terms of b,c,d.
I want the result of this to be:
a = M*b + N*c + P*d
Is there a way to do this in Matlab?
Best Answer