Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB : frequency distribution

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.

Any help is appreciated !

like image 886
Arkapravo Avatar asked Apr 14 '26 00:04

Arkapravo


1 Answers

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
like image 185
mtrw Avatar answered Apr 16 '26 02:04

mtrw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!