MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   MATLAB:频率分布 (https://www.labfans.com/bbs/showthread.php?t=23282)

poster 2019-12-10 20:30

MATLAB:频率分布
 
我在文本文件中观察到500个数字值(范围从1到25000),我希望在MATLAB中进行频率分布。我确实尝试过直方图(历史),但是我更喜欢频率分布曲线而不是块和条形图。

任何帮助表示赞赏!



[B]回答:[/B]

如果将两个输出参数传递给[URL="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/hist.html"]HIST[/URL] ,则将同时获得x轴和y轴值。然后,您可以根据需要绘制数据。例如,

[counts, bins] = hist(mydata); plot(bins, counts); %# get a line plot of the histogram

[url=https://stackoverflow.com/questions/2597743]更多&回答...[/url]


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

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