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

📄 mm2732.m

📁 《精通matlab7》“mastering matlab 7”的代码。
💻 M
字号:
[X,Y,Z,V] = flow;
fv = isosurface(X,Y,Z,V,-2);
subplot(2,2,1) % Original
p = patch(fv);
Np = size(get(p,'Faces'),1);
set(p,'FaceColor',[.5 .5 .5],'EdgeColor','Black');
view(3),axis equal tight, grid on  % pretty it up
zlabel(sprintf('%d Patches',Np))
title('Figure 27.32a: Original')
subplot(2,2,2) % Reduce Volume
[Xr,Yr,Zr,Vr] = reducevolume(X,Y,Z,V,[3 2 2]);
fvr = isosurface(Xr,Yr,Zr,Vr,-2);
p = patch(fvr);Np = size(get(p,'Faces'),1);
set(p,'FaceColor',[.5 .5 .5],'EdgeColor','Black');
view(3),axis equal tight, grid on  % pretty it upzlabel(sprintf('%d Patches',Np))
title('Figure 27.32b: Reduce Volume')

subplot(2,2,3) % Reduce Patch
p = patch(fv);
set(p,'FaceColor',[.5 .5 .5],'EdgeColor','Black');
view(3),axis equal tight, grid on  % pretty it up
reducepatch(p,.15) % keep 15 percent of the faces 
Np = size(get(p,'Faces'),1);
zlabel(sprintf('%d Patches',Np))
title('Figure 27.32c: Reduce Patches')

subplot(2,2,4) % Reduce Volume and Patch
p = patch(fvr);
set(p,'FaceColor',[.5 .5 .5],'EdgeColor','Black');
view(3),axis equal tight, grid on  % pretty it up
reducepatch(p,.15) % keep 15 percent of the faces 
Np = size(get(p,'Faces'),1);
zlabel(sprintf('%d Patches',Np))
title('Figure 27.32d: Reduce Both')

⌨️ 快捷键说明

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