• / 21
• 下载费用：10 金币

# matlab讲义9.ppt

matlab讲义9.ppt

Week 9,3D Plots 4D Plots Movies,The 3D version of plot is:plot3(x1,y1,z1,s1,x2,y2,z2,s2,…),Three-dimensional Graphics,t = 0:pi/50:10*pi; plot3(sin(t),cos(t),t);,Curve plot in 3D,Surface Plot,X (resp. Y) is a matrix containing all the x-coordinates (resp. y) of the points on the grid, i.e. (X(i,j), Y(i,j)) is the coordinate of the (i,j)-th point in the grid.,compute Z at each coordinate in the mesh and plot,To plot, [X,Y]=meshgrid(-6 : 0.1 : 6, -6 : 0.1 : 6); R=sqrt(X.^2+Y.^2+.1); Z=sin(R)./R; mesh(X,Y,Z),The Mexican Hat, meshz(X,Y,Z) plot with zero plane, meshc(X,Y,Z) draws the underlying contours, surf(X,Y,Z) surface is filled with plates, surfnorm(X,Y,Z) plot normal vectors, shading interp; surface is shaded by interpolation, view(10,60); view from different angle, colormap(hot); surface is shaded with different color, colorbar bar gives height, contour(X,Y,Z,20) 20 contour lines, contour3(X,Y,Z,20) 20 contour lines in 3D with correct height,How to generate a sphere? [X,Y,Z]=sphere(20); % sphere with 20 longitudes and 20 latitudes surf(X,Y,Z),How is it done in Matlab? First generate a rectangular grid of longitudes and latitudes n=20; [long,lat] = meshgrid(-pi: 2*pi/n :pi, -pi/2: pi/n :pi/2);,X = cos(lat) .* cos(long); Y = cos(lat) .* sin(long);,These latitude and longitude values are then mapped to the X and Y spherical coordinates., Z = sin(lat); surf(X, Y, Z);,Using the X and Y spherical coordinates, we can compute the Z spherical coordinate, and plot the surface:,Four-dimensional Graphics,How to visualize 4D volume:,Cut the volume by planes. On each plane, illustrate the value of V by different colors,The Program:,Contour plots: contourslice(X,Y,Z,V,[],,[],20) Plot 20 contour lines on the plane y=0,Isosurface plots: isosurface(X,Y,Z,V,1) Draw the surface where V=1,Movie,30 Frames per second,How movie is made?,Let’s generate the Mexican hat surface and rotate it around,, 微传网所有资源均是用户自行上传分享，仅供网友学习交流，未经上传用户书面授权，请勿作他用。
0条评论

## 当前资源信息 hskm5268 ## 相关资源

• ## 物资采购 投标文件.doc

• ## 物理阶段性考试.doc

• ## 细胞生物学笔记-信号转导.doc

• ## 细胞工程考试复习题.doc

• ## arrive in,arrive at,reach和get to的用法和区别.doc

• ## A3中建五局公司 总承包实施计划.doc

• ## 物理科学中的数学 戴森 F。J。Dys.doc

• ## 供配电系统培训讲义(工程监理用).doc

• ## 8、渗漏维修施工参考资料.doc

• 微传网博客

网站客服QQ:80879498  会员QQ群：727456886

copyright@ 2018-2028 微传网络工作室版权所有

经营许可证编号：冀ICP备18006529号-1 ， 公安局备案号：13028102000124

收起
展开