本文介绍了MATLAB:频率分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个文本文件中有500个数值的原始观测值(范围从1到25000),我希望在MATLAB中进行频率分布.我确实尝试了直方图(hist),但是我更喜欢频率分布曲线,而不是块和条.
I have raw observations of 500 numeric values (ranging from 1 to 25000) in a text file, I wish to make a frequency distribution in MATLAB. I did try the histogram (hist), however I would prefer a frequency distribution curve than blocks and bars.
感谢您的帮助!
推荐答案
如果将两个输出参数传递给 HIST ,您将同时获得x轴和y轴值.然后,您可以根据需要绘制数据.例如,
If you pass two output parameters to HIST, you will get both the x-axis and y-axis values. Then you can plot the data as you like. For instance,
[counts, bins] = hist(mydata);
plot(bins, counts); %# get a line plot of the histogram
这篇关于MATLAB:频率分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!