err_helmholtz.m
来自「A 2D homogeneous Helmholtz case (u=sin(x」· M 代码 · 共 25 行
M
25 行
% Error distributions in 3D figure for two dimensional problems
% n number of node at each direction
% x are coordinate, z1 & z2 are absolute and relative errors
function err_helmholtz(n,x,y,z1,z2)
colordef black; % set backgroud as black and axises as white
colormap(hsv); % a color spectrum associated with numerical values
mesh(x,y,z1) % generate absolute error distribution 3D figure
hidden off % exposure the hidden part of figure
xlabel('x');
ylabel('y');
zlabel('absolute error');
title(['Absolute error for a Helmholtz case using ',num2str(n),'*',num2str(n), ' nodes']);
pause
mesh(x,y,z2) % generate absolute error distribution 3D figure
hidden off % exposure the hidden part of figure
xlabel('x');
ylabel('y');
zlabel('relative error');
title(['Relative error for Xing`s 2D Laplacian using ',num2str(n),'*',num2str(n), ' nodes']);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?