📄 e972.m
字号:
%-----------------------------------------------------------------------
% Example 9.7.2: Plate Deflection
%-----------------------------------------------------------------------
% Initialize
clc % clear screen
clear % clear variables
global xg yg V % used in funq972.m
m = 15; % number of x grid points
n = 15; % number or y grid points
q = 500; % maximum number of iterations
a = 3; % plate width (m)
b = 3; % plate length (m)
tol = 1.e-4; % error tolerance
% Solve first Poisson system
fprintf ('Example 9.7.2: Plate Deflection\n');
[alpha,r,xg,yg,V] = poisson (a,b,m,n,q,tol,'funp972','');
show ('Number of iterations',r)
show ('Relaxation parameter alpha',alpha)
% Solve second Poisson system
[alpha,r,xg,yg,U] = poisson (a,b,m,n,q,tol,'funq972','');
show ('Number of iterations',r)
show ('Maximum deflection (m)',max(max(U)))
plotxyz (xg,yg,U,'Plate Deflection','x (m)','y (m)','u (m)')
%-----------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -