how to plot a normal distribution and calculate mean and standard deviation ?
Show older comments
I have a data which is (4259*1 cell)

i want to get its normal distribution and to calculate its mean and standard deviation to get a graph like this:

I try :
[ndata text alldata] = xlsread('final53.xlsx','device age manuf');
[R,C]=size(alldata);
colsize=max(C);
data=alldata(:,14);
[mean,st]=normfit(data);
but i get an error:
Undefined function or method 'times' for input
arguments of type 'cell'.
Error in ==> normfit at 102
sumx = sum(freq.*x);
Error in ==> plotdata at 42
[mean,st]=normfit(data);
how to plot the normal distribution and calculate mean and standard deviation?
Accepted Answer
More Answers (1)
Image Analyst
on 17 Sep 2015
1 vote
Try using ndata instead of alldata.
1 Comment
Amr Hashem
on 18 Sep 2015
Categories
Find more on Exploration and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!