我正在尝试使用Matlab 2012b中的符号数学工具箱来获取一组方程的符号解。我的代码如下:
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})
我收到的错误如下:
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{:});
据我所知,一切都与他们在例子中的表现相符。我不确定它在抱怨什么。