clxrotzf.m

来自「Programs for the book Advanced Engineeri」· M 代码 · 共 12 行

M
12
字号
function yh3rotz=clxrotzf(xto_rot,theta_rot)
% CALL: yh3rotz=clxrotzf(xto_rot,theta_rot)
%  Rotate the vector xto_rot by the angle theta_rot 
%    around the z axis
%  xto_rot must be a 4 x 1 column vector, theta_rot in degrees.
theta_rot=theta_rot*pi/180;       % Convert to radians
Arotz=[cos(theta_rot) -sin(theta_rot) 0 0;sin(theta_rot)...
 cos(theta_rot) 0 0
0 0 1 0;0 0 0 1];
yh3rotz=Arotz*xto_rot;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?