program10.m

来自「Main program which calls the function MI」· M 代码 · 共 25 行

M
25
字号
%=========================================================================
%
% Program10.m
% Main program which calls the function MITER
%
%=========================================================================
% Run "Program10" in MATLAB command window. Progrm10.m, Miter.m and Mult.m
% should be in the same folder,and set the Matalb path to this folder
% following 6 lines contain problem-dependent data
n=3;
nvec=3;
d=[2.0 1.0 1.0; 1.0 2.0 2.0; 1.0 2.0 3.0];
xm=[1 0 0;0 1 0; 0 0 1];
eps=0.00001;
xs=[1 1 1];
% end of problem-dependent data
[freq,eig,b,c,xx]=miter(d,xs,n,nvec,xm,eps);
fprintf('Solution of eigenvalue peoblem by \n');
fprintf('matrix iteration method \n\n');
fprintf('Natural frequencies: \n\n');
fprintf('    %8.6e     %8.6e      %8.6e \n\n', freq(1),freq(2),freq(3));
fprintf('Mode shapes (Columnwise): \n\n');
for i=1:nvec
   fprintf('    %8.6e     %8.6e      %8.6e \n', eig(i,1),eig(i,2),eig(i,3));
end

⌨️ 快捷键说明

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