MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 如何做频数分布表 (https://www.labfans.com/bbs/showthread.php?t=11815)

牙鸟日尧 2010-06-30 16:10

如何做频数分布表
 
[FONT="楷体"][SIZE="6"] vdata=[18,20,16,6,16,17,12,14,16,18,14,14,16,9,20,18,12,15,13,16,16,21,21,9,16,20,14,14,16,16];
将数据分组,是组中值分别为6,9,12,15,18,21,作出x的频数分布表,作出频率分布直方图[FONT="黑体"][SIZE="5"][/SIZE][/FONT][/SIZE][/FONT]

slgu 2010-07-02 10:01

回复: 如何做频数分布表
 
x=[18,20,16,6,16,17,12,14,16,18,14,14,16,9,20,18,12,15,13,16,16,21,17]
x =
Columns 1 through 12
18 20 16 6 16 17 12 14 16 18 14 14
Columns 13 through 23
16 9 20 18 12 15 13 16 16 21 17
>> hh=[6 9 12 15 18 21]
hh =
6 9 12 15 18 21
>> h=hist(x,hh)
h =
1 1 3 10 5 3
>> bar(hh,h)
>>


所有时间均为北京时间。现在的时间是 12:50

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.