poster
2019-12-10, 20:30
我在文本文件中观察到500个数字值(范围从1到25000),我希望在MATLAB中进行频率分布。我确实尝试过直方图(历史),但是我更喜欢频率分布曲线而不是块和条形图。
任何帮助表示赞赏!
回答:
如果将两个输出参数传递给HIST (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/hist.html) ,则将同时获得x轴和y轴值。然后,您可以根据需要绘制数据。例如,
[counts, bins] = hist(mydata); plot(bins, counts); %# get a line plot of the histogram
更多&回答... (https://stackoverflow.com/questions/2597743)
任何帮助表示赞赏!
回答:
如果将两个输出参数传递给HIST (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/hist.html) ,则将同时获得x轴和y轴值。然后,您可以根据需要绘制数据。例如,
[counts, bins] = hist(mydata); plot(bins, counts); %# get a line plot of the histogram
更多&回答... (https://stackoverflow.com/questions/2597743)