gusucode.com > 《精通matlab 7》包括配套光盘 > 配套光盘里的程序附件/Ex-24/Ex2415.m
%例24-15 创建多个片块模型 %Ex24-15 draw multi-patches clear close all subplot(1,2,1) X=[0 0;0 1;0 1;0 0]; Y=[0 0;1 0;1 1;0 1]; Z=[0 0;0 0;1 0;1 0]; patch(X,Y,Z,'r') view([30,30]) subplot(1,2,2) Vm=[0 0 0;1 0 0;1 0 1;0 0 1;0 1 1;1 1 1;1 1 0]; Fm=[1 2 3 4;3 4 5 6;6 3 2 7]; patch('Vertices',Vm,'Faces',Fm,'EdgeColor','r') view([30,30])