当前位置:网站首页>Matlab画图2
Matlab画图2
2022-08-04 20:31:00 【万年老竹】
Matlab画图 2 统计类图像
图像类型

1.直方图 histogram
适用情况:统计整体的分布情况
histogram(X)
//histogram 函数自动选择合适的 bin 的数量,以便涵盖 x 中的值范围并显示基本分布的形状。
histogram(X,nbins)
//使用标量 nbins 指定的 bin 数量。
histogram(X,edges)
//将 X 划分到由向量 edges 来指定 bin 边界的 bin 内。每个 bin 都包含左边界,但不包含右边界,除了同时包含两个边界的最后一个 bin 外。
eg:
y=randn(1,1000);
subplot(2,1,1);histogram(y);title('Bins=default');
subplot(2,1,2);histogram(y,50);title('Bins=50');
结果如下

2.直方图 Bar Chart
适用情况:个体之间不同的分布情况 eg:
x=[1 2 5 4 8];y=[x;1:5];
subplot(1,3,1);bar(x);title('bar of x');
subplot(1,3,2);bar(y);title('bar of y');
subplot(1,3,3);bar3(y);title('bar of y 3D');
结果如下

3.堆叠和水平条形图 Stacked and Horizontal Bar Chart
eg:
x=[1 2 5 4 8];y=[x;1:5];
subplot(1,3,1);bar(x,'stacked');title('bar of x in stacked');
subplot(1,3,2);bar(y,'stacked');title('bar of y in stacked');
subplot(1,3,3);barh(y);title('bar of y in horizontal');
结果如下

4.饼状图 Pie Chart
eg:
x=[1 2 5 6];
subplot(2,2,1);pie(x);
subplot(2,2,2);pie(x,[0,0,0,1]);
subplot(2,2,3);pie3(x);
subplot(2,2,4);pie3(x,[0,0,0,1]);
结果如下

5.极坐标图 Polar Chart
6.阶梯图与针状图 Stair and Stem Chart
7.箱线图与误差条线图 Boxplot and Error Bar
8.
边栏推荐
- [Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...
- IIC驱动OLED
- 2022-8-4 第七组 ptz 锁与线程池和工具类
- If it is test axi dma catch a few words here
- ASP.NET商贸进销存管理系统源码(带数据库文档)源码免费分享
- 刷题-洛谷-P1200 你的飞碟在这儿Your Ride Is Here
- Nuxt.js的优缺点和注意事项
- 二叉树的遍历
- zynq records
- After the tester with 10 years of service "naked resignation" from the big factory...
猜你喜欢
随机推荐
使用 Chrome 开发者工具的 lighthouse 功能分析 web 应用的性能问题
hash和history路由的区别
C语言基础[通俗易懂]
node 的运行命令
[Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...
CAS :80750-24-9(脱硫生物素 NHS 酯)
The difference between Client Side Cache and Server Side Cache
[TypeScript] In-depth study of TypeScript enumeration
MySQL stored procedure introduction, creation, case, delete, view "recommended collection"
"WAIC 2022 · hackers marathon" two ants wealth competition invited you to fight!
基于HDF的LED驱动程序开发(2)
Zero-knowledge proof - zkSNARK proof system
数字IC设计中基本运算的粗略的延时估计
Win10 uwp use ScaleTransform magnify an element
WIN10系统如何开启终端
数据安全解决方案的发展
Aura clock chip generation configuration file script
【AGC】构建服务1-云函数示例
ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
该如何训练好深度学习模型?