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

📄 drawmesh.m

📁 解决麦克斯韦的matlab源文件
💻 M
字号:
function drawmesh(mesh,titstr)% Graphical output of 2D unstructured grid%% mesh -> 2D triangulation in special mesh format%if (nargin < 2), titstr = 'Mesh'; end;ebd_idx  = find(mesh.ebfl(:,1) ~= 0);eint_idx = find(mesh.ebfl(:,1) == 0);s = sprintf(' : %d vts, %d edges, %d cells',mesh.Nv,mesh.Ne,mesh.Nt);figure; clf;hold on;title([titstr s]);for i=eint_idx'  ev = [mesh.vt(mesh.ep(i,1),:)' mesh.vt(mesh.ep(i,2),:)'];   plot(ev(1,:),ev(2,:),'b-');endfor i=ebd_idx'  ev = [mesh.vt(mesh.ep(i,1),:)' mesh.vt(mesh.ep(i,2),:)'];   plot(ev(1,:),ev(2,:),'r-');endhold off;figure; clf;hold on;title(s);quiver(mesh.vt(mesh.ep(eint_idx,1),1),mesh.vt(mesh.ep(eint_idx,1),2),...       mesh.vt(mesh.ep(eint_idx,2),1)-mesh.vt(mesh.ep(eint_idx,1),1),...       mesh.vt(mesh.ep(eint_idx,2),2)-mesh.vt(mesh.ep(eint_idx,1),2),0,'-b');quiver(mesh.vt(mesh.ep(ebd_idx,1),1),mesh.vt(mesh.ep(ebd_idx,1),2),...       mesh.vt(mesh.ep(ebd_idx,2),1)-mesh.vt(mesh.ep(ebd_idx,1),1),...       mesh.vt(mesh.ep(ebd_idx,2),2)-mesh.vt(mesh.ep(ebd_idx,1),2),0,'-r');hold off;

⌨️ 快捷键说明

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