I'm trying to use the symbolic math toolbox in Matlab 2012b to get symbolic solutions to a set of equations. My code looks like:
syms CPitch CRoll CYaw CX CY CZ
syms VPitch VRoll VZ
syms MPitch MRoll MZ
Eqs = [ MPitch == cos(VRoll)*CPitch + cos(CYaw)*VPitch;
MRoll == cos(CYaw)*VRoll + sin(CYaw)*VPitch + CRoll;
MZ == CZ*cos(VPitch)*sin(VRoll) + CY*sin(VPitch)*sin(VRoll) ];
solve(Eqs, {VRoll, VPitch, VZ})
I get back errors that look like:
Error in solve>tochar (line 289)
vc = char(v);
Error in solve>getEqns (line 254)
vc = tochar(v);
Error in solve (line 150)
[eqns,vars,options] = getEqns(varargin{:});
As far as I can tell everything matches how they do it in their examples. I'm not sure what it's complaining about.