tanimate.m

来自「利用matalab编制的转子动力学计算软件。其中模型利用有限元建模」· M 代码 · 共 28 行

M
28
字号
function M=tanimate(Rot,no,N,T)
%M=tanimate(Rot,no,[N,T])
%
%
% animate the torional vibration of a rotor system
% using the 3d plot routine
if nargin<3, N=8; end
if nargin<2, no=2; end
if nargin>3, cT=1; else, cT=0; end
Rot=shaffet2(Rot);
[V D]=eig(Rot.K,Rot.M);
for q=1:length(V)
   V(:,q)=V(:,q)/max( abs (V(:,q)) );
end

drawrot3dmode(Rot,V(:,1));
      if cT, view(T); end
M=moviein(N);
for q=0:N-1
   w=sin(q*2*pi/N);
   drawrot3dmode(Rot,V(:,no)*w);
   if q==0, ax=axis;
   else, axis(ax); end
      if cT, view(T); end

   M(:,q+1)=getframe;
end
movie(M,4);

⌨️ 快捷键说明

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