Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Data Distribution

Asked by developer on 29 Sep 2011

Hello, I have some data and i want to see it in plot that how it is distributed all over, like getting some plot , but the plot command donot give me smooth curve or response i want to see it in curve.Or u can say like gaussian distribution of my historgram like this one

http://www.chemicool.com/definition/gaussian_distribution.html

Thanks in advance

0 Comments

developer

Products

No products are associated with this question.

2 Answers

Answer by Walter Roberson on 29 Sep 2011

Perhaps you want to use hist() to draw a histogram of the data?

1 Comment

developer on 29 Sep 2011

but i want to see the curve plotting on to that histogram

Walter Roberson
Answer by Wayne King on 29 Sep 2011

Then perhaps, you would like to try histfit() with some specified distribution.

    histfit(randn(1e3,1),20,'normal')

or use ksdensity()

x = [randn(30,1); 5+randn(30,1)];
[f,xi] = ksdensity(x); 
plot(xi,f); 

The Wavelet Toolbox also has 1-D density estimation capability.

0 Comments

Wayne King

Contact us