你好同学!可以这么解算,运用matlab符号工具箱:
syms ptp [3,1] %这个表示三个带点的符号组成的向量
syms A [3,3]
syms phi theta psi p q r real
R = [1,0,0; 0, cos(phi), sin(phi); 0, -sin(phi), cos(phi)];
RpRt = [cos(theta), 0, sin(theta);
-sin(theta)*sin(phi), cos(phi), cos(theta)*sin(phi);
-sin(theta)*cos(phi), -sin(phi), cos(phi)*cos(theta)];
eq = [p;q;r] - [ptp(1); 0; 0] - R*[0; ptp(2); 0] - RpRt*[0; 0; ptp(3)];
[ptp(1), ptp(2), ptp(3)] = solve(eq, ptp); %求解
I = eye(3);
for i = 1:3
for j = 1:1:3
A(i,j) = subs(ptp(i), [p,q,r], I(j,:));
end
end
A = simplify(A)
但是我根据你提供的数据发现得到的结果第一行后两个数跟书上反号了,请仔细核查输入的可能错误的地方
A =
[ 1, -(sin(phi)*sin(theta))/cos(theta), -(cos(phi)*sin(theta))/cos(theta)]
[ 0, cos(phi), -sin(phi)]
[ 0, sin(phi)/cos(theta), cos(phi)/cos(theta)]
有帮助望采纳,谢谢啦