1186 1

MATLAB课程:代码示例之Graphics and Visualization(二) [推广有奖]

企业贵宾

已卖:160份资源

巨擘

0%

还不是VIP/贵宾

-

威望
4
论坛币
624047 个
通用积分
180.4253
学术水平
918 点
热心指数
987 点
信用等级
841 点
经验
399113 点
帖子
9786
精华
48
在线时间
17322 小时
注册时间
2014-8-19
最后登录
2022-11-2

楼主
widen我的世界 学生认证  发表于 2016-3-8 14:41:45 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

MATLAB课程:代码示例之Graphics and Visualization(二)


Creating 3-D Plots


This example shows how to create a variety of 3-D plots in MATLAB®.


Mesh Plot

The mesh function creates a wireframe mesh. By default, the color of the mesh is proportional to the surface height.

z = peaks(25);figuremesh(z)


Surface Plot

The surf function is used to create a 3-D surface plot.

surf(z)colormap(jet)    % change color map


Surface Plot (with Shading)

The surfl function creates a surface plot with colormap-based lighting. For smoother color transitions, use a colormap with linear intensity variation such as pink.

surfl(z)colormap(pink)    % change color mapshading interp    % interpolate colors across lines and faces


Contour Plot

The contour function is used to create a plot with contour lines of constant value.

contour(z,16)colormap default    % change color map


Quiver Plot

The quiver function plots 2-D vectors as arrows.

x = -2:.2:2;y = -1:.2:1;[xx,yy] = meshgrid(x,y);zz = xx.*exp(-xx.^2-yy.^2);[px,py] = gradient(zz,.2,.2);quiver(x,y,px,py)xlim([-2.5 2.5])    % set limits of x axis


Slices through 3-D Volumes

The slice function displays data at planes that slice through volumetric data.

x = -2:.2:2;y = -2:.25:2;z = -2:.16:2;[x,y,z] = meshgrid(x,y,z);v = x.*exp(-x.^2-y.^2-z.^2);xslice = [-1.2,.8,2];    % location of y-z planesyslice = 2;              % location of x-z planezslice = [-2,0];         % location of x-y planesslice(x,y,z,v,xslice,yslice,zslice)xlabel('x')ylabel('y')zlabel('z')




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:MATLAB课程 Graphics GRAPHIC MATLAB Visual MATLAB课程 代码示例 GraphicsandVisualization Creating3-DPlots


https://www.cda.cn/?seo-luntan
高薪就业·数据科学人才·16年教育品牌

沙发
点滴记录life 在职认证  学生认证  发表于 2016-3-8 14:43:46
好厉害,好赞,有用,thanks for sharing。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-9 10:38