matlab入门

发布时间 : 星期日 文章matlab入门更新完毕开始阅读

contour3画出曲面在三度空间中的等高线: contour3(peaks, 20); axis([-inf inf -inf inf -inf inf]);

contour画出曲面等高线在XY平面的投影: contour(peaks, 20);

plot3可画出三度空间中的曲线: t=linspace(0,20*pi, 501); plot3(t.*sin(t), t.*cos(t), t);

亦可同时画出两条三度空间中的曲线: t=linspace(0, 10*pi, 501);

plot3(t.*sin(t), t.*cos(t), t, t.*sin(t), t.*cos(t), -t);

4.三维网图的高级处理 1. 消隐处理

例.比较网图消隐前后的图形 z=peaks(50); subplot(2,1,1); mesh(z);

title('消隐前的网图') hidden off subplot(2,1,2) mesh(z);

title('消隐后的网图') hidden on colormap([0 0 1])

2. 裁剪处理

利用不定数NaN的特点,可以对网图进行裁剪处理 例.图形裁剪处理 P=peaks(30); subplot(2,1,1); mesh(P);

title('裁剪前的网图') subplot(2,1,2);

P(20:23,9:15)=NaN*ones(4,7); %剪孔

联系合同范文客服:xxxxx#qq.com(#替换为@)