您的位置 首页 > 数码极客

‘如何用matlab画数据图像’matlab输入数据输出图像!


Part 1直方图的绘制

hist(a,b)

a为要绘制的变量,b为柱形的个数。

subplot(a,b,c)显示图像的位置布局,显示b行a列个图像,此图像是其中的第c个。

hist(a,b)

a is the variable to be drawn, and b is the number of bars.

subplot(a,b,c) displays the position layout of the image, displaying images in row b and column a, and this image is the cth image.

例:

Part 2Bar chart柱状图的绘制

Bar(a):a为柱状图标准,可设置如下:

X=[1 2 5 4 8];每个长条的高度;Y=[x;1:5];Y是一个矩阵,会成为两组柱状图。

Bar3(y),绘制三维图。

Bar(a): a is the bar chart standard, which can be set as follows:

X=[1 2 5 4 8]; the height of each bar; Y=[x;1:5]; Y is a matrix, which will become two sets of histograms.

Bar3(y), draw a three-dimensional graph.

例:

Part 3堆栈式和水平柱状图的绘制

Bar(y,’stacked’)表示压栈:这一块的高度表示其大小

Barh(y):表示水平柱状图

Bar(y,’stacked’) means stacking: the height of this block indicates its size.

Barh(y): Represents a horizontal histogram.

例:

Part 4饼状图的绘制

Pie(a),a为向量

Pie(a,[1,0,0,0]),第二个参数也是向量,如果哪个位置为1,则表示饼图哪个扇形会分开

Pie3(a):三维的饼状图

Pie(a), a is a vector.

Pie(a,[1,0,0,0]), the second parameter is also a vector, if which position is 1, it means which sector of the pie chart will be separated.

Pie3(a): Three-dimensional pie chart.

例:

Part 5极坐标图的绘制

Polar(theta,r);theta为角度,r为半径。

Polar(theta,r); theta is the angle and r is the radius.

例:

Part 6阶梯图和火柴梗图

阶梯图:stairs(y);火柴梗图:stem(y)

Ladder diagram: stairs(y); matchstick diagram: stem(y)

例:绘制sin(x)的阶梯图和火柴梗图

参考文献:台大郭彦甫MATLAB教程、谷歌翻译

本文由LearningYard学苑原创,如有侵权,请联系删除。

责任编辑: 鲁达

1.内容基于多重复合算法人工智能语言模型创作,旨在以深度学习研究为目的传播信息知识,内容观点与本网站无关,反馈举报请
2.仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证;
3.本站属于非营利性站点无毒无广告,请读者放心使用!

“如何用matlab画数据图像,matlab输入数据输出图像,如何用matlab把图像导出数据,matlab根据数据画图像,matlab给定数据画图像,如何把ma”边界阅读