📄 vtb4_1
字号:
function [P,w,U]=vtb4_1(M,K,dispar)%VTB4_1 Natural frequencies and eigenvectors for an undamped%system.% [P,w,U]=VTB4_1(M,K) will return the natural frequencies (w),% eigenvectors (P), and mode shapes (U) for an undamped system. % The inputs are the mass matrix M and the stiffness matrix K. % [P,w,U]=VTB4_1(M,K,1) will also print the output of the function% to the screen.if nargin==2 dispar=0;end%Calculates evectors and evalues[P,lam]=eig(M^(-.5)*K*M^(-.5));[w,k]=sort(sqrt(diag(lam)));P=P(:,k);%Makes sure the first entry of every column is positivefor i=1:length(M) if P(1,i)<0 P(:,i)=-P(:,i); endendU=M^(-.5)*P;if dispar==1 clc disp('The natural frequencies are') disp(' ') for i=1:length(M) disp(['omega',num2str(i),' = ',num2str(w(i)),' rad/s']) end disp(' ') disp('The eigenvectors of the system are') P disp(' ') disp('The mode shapes of the system are') Uend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -