1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
clear; clc; close;
psi = (30)*(pi/180);
theta = (45)*(pi/180);
phi = (60)*(pi/180);
Rz = [cos(psi) -sin(psi) 0; sin(psi) cos(psi) 0; 0 0 1]; Ry = [cos(theta) 0 sin(theta); 0 1 0; -sin(theta) 0 cos(theta)]; Rx = [1 0 0; 0 cos(phi) -sin(phi); 0 sin(phi) cos(phi)];
Rzyx = Rz*Ry*Rx; Rzxy = Rz*Rx*Ry; Ryzx = Ry*Rz*Rx; Ryxz = Ry*Rx*Rz; Rxzy = Rx*Rz*Ry; Rxyz = Rx*Ry*Rz;
fig = figure;
set(fig, ... 'Name', '旋转顺序', ... 'NumberTitle', 'off', ... 'Color', 'w', ... 'Position', [50 50 1280 720]);
for i = 1:9 subplot(3,3,i); hold on; grid on; box on; set(gca, ... 'GridLineStyle', '-.', ... 'GridAlpha', 0.5); xlim([1 6]); ylim([-1 1]); [row,col] = ind2sub(size(Rzyx),i); plot([Rzyx(i),Rzxy(i),Ryzx(i),Ryxz(i),Rxzy(i),Rxyz(i)], '-or'); title(['$$\rm{row:}\,$$',num2str(row),'$$\,\,\rm{column:}$$',num2str(col)], 'Interpreter','latex'); end
|