0

我正在尝试使用 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{:});

据我所知,一切都与他们在示例中的操作方式相匹配。我不确定它在抱怨什么。

4

0 回答 0