⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 err_helmholtz.m

📁 A 2D homogeneous Helmholtz case (u=sin(x)cos(y) with a square) with % two Dirichlet edges (x=1,y=1
💻 M
字号:
% 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -