ex4_10.m

来自「Advanced Engineering Mathematics using M」· M 代码 · 共 11 行

M
11
字号
% EX4_10.M Compare qr and eig commands to find eigenvalues%  The script pauses after each qr iterationA = [1 -1 0 0;3 5 0 0;0 0 1 5;0 0 -1 1][V,D]=eig(A)pause% Compute QR sequence; R*Q converges to quasi-diagonalN=input('Number of Iterations, N= ')for I=1:N,[Q,R]=qr(A);,I,A=R*Q,pause,end%% Note: this is a good script to step through to determine%  the operation of the qr command

⌨️ 快捷键说明

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