vtb9_1

来自「vtoolbox3.5是振动数值模拟工具箱」· 代码 · 共 28 行

TXT
28
字号
function [v,w,zeta]=VTB9_1(m,d,k)%VTB9_1 VTB9_1(m,d,k)% [v,w,zeta]=VTB9_1(m,d,k)% function VTB9_1 finds the mode shapes and natural frequencies of% a linear second order matrix equation.  % [v,w]=VTB9_1(m,k) finds the mode shapes and natural frequencies % for the undamped case.if nargin==2  k=d;  [v,w]=eig(m\k);  w=sqrt(w);endif nargin==3  if d/m*k==k/m*d    disp('Damping is proportional, eigenvectors are real')    [v,w]=eig(m\k);    w=sqrt(w);    zeta=(v'*m*v)\(v'*d*v)/2/w;   else    disp('Damping is non-proportional, eigenvectors are complex')    a=[0*k eye(length(k));-m\k -m\d];    [v,w1]=eig(a);    w=abs(w1);    zeta=-real(w1)/w;  endendw=diag(w);zeta=diag(zeta);

⌨️ 快捷键说明

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