orrsom.m
来自「matlab6矩阵微分工具 matlab6矩阵微分工具」· M 代码 · 共 21 行
M
21 行
% The script file orrsom.m computes the eigenvalues of the Orr-Sommerfeld% equation using NxN Chebyshev differentiation matrices.% S.C. Reddy, J.A.C. Weideman 1998N = input(' Order of the differentiation matrix: N = ? ');R = input(' Reynolds number: R = ? ');i = sqrt(-1);[x,DM] = chebdif(N+2,2); % Compute second derivative D2 = DM(2:N+1,2:N+1,2); % Enforce Dirichlet BCs [x,D4] = cheb4c(N+2); % Compute fourth derivative I = eye(size(D4)); % Identity matrixA = (D4-2*D2+I)/R-2*i*I-i*diag(1-x.^2)*(D2-I); % Set up A and B matricesB = D2-I;e = eig(A,B);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?