1 function plot_mesh(X,bbox)
5 X{i}=X{i}(bbox(1):bbox(2),bbox(3):bbox(4),bbox(5):bbox(6));
9 nx=nx-1; ny=ny-1; nz=nz-1;
15 properties={'FaceColor', 'b', 'FaceAlpha', 0.05, 'EdgeColor','k','EdgeAlpha',1};
23 xx = vpatch3(x,i,j,k,ivar);
24 yy = vpatch3(y,i,j,k,ivar);
25 zz = vpatch3(z,i,j,k,ivar);
27 patch('Xdata', xx, 'YData', yy, 'ZData', zz, properties{:});
36 function v=vpatch3(a,i,j,k,ivar)
39 v=[a(i,j,k),a(i,j+1,k),a(i,j+1,k+1),a(i,j,k+1)];
41 v=[a(i,j,k),a(i+1,j,k),a(i+1,j,k+1),a(i,j,k+1)];
43 v=[a(i,j,k),a(i+1,j,k),a(i+1,j+1,k),a(i,j+1,k)];