MATLAB: SOLVE for linear system of eqns simbolically

MATLABsyms symbolic linear system

Hi all, I'm trying to solve a simple linear system symbolically. The code is:
syms a b c d xh xi xj xl yh yi yj yl u1 u2 u3 u4;
[a,b,c,d]=solve('u1=a+b*xh+c*yh+d*xh*yh','u2=a+b*xi+c*yi+d*xi*yi', ...
'u3=a+b*xj+c*yj+d*xj*yj','u4=a+b*xl+c*yl+d*xl*yl');
pretty(a)
pretty(b)
pretty(c)
pretty(d)
and I get:
a - u1 + c yh
- -------------
b + d yh
a - u2 + c yi
- -------------
b + d yi
a - u3 + c yj
- -------------
b + d yj
a - u4 + c yl
- -------------
b + d yl
In other words, the results are as function of the results themselves. Am I missing something?

Best Answer

You aren’t missing something, but solve is missing explicit instructions on what to solve for.
Try:
[a,b,c,d]=solve('u1=a+b*xh+c*yh+d*xh*yh','u2=a+b*xi+c*yi+d*xi*yi', ...
'u3=a+b*xj+c*yj+d*xj*yj','u4=a+b*xl+c*yl+d*xl*yl', a,b,c,d);
The variables aren’t functions of each other this way.
(Running R2014a here, earlier versions might give different results and require different command structures.)