rotvectest.m
来自「这是《Numerical Methods with MATLAB: Imple」· M 代码 · 共 19 行
M
19 行
% rotvectTest Use the rotvec function to rotate some vectors
ui = [1 0 0]';
disp('flip [1 0 0] through 90 about z axis'); u = rotvec(ui,0,0,90)
disp('flip [1 0 0] through 180 about y axis'); u = rotvec(ui,0,180,0)
ui = [1 1 1]';
disp('flip [1 1 1] through 45 about all axes'); u = rotvec(ui,45,45,45)
ui = [-2 3 1]';
disp('flip [-2 3 1] through 30 about z axis'); u = rotvec(ui,0,0,30)
% --- demonstrate that length is unaffected by rotation
uf = rotvec(ui,25,-145,202);
norm(ui)
norm(uf)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?