how to plot a normal distribution and calculate mean and standard deviation ?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Amr Hashem
am 17 Sep. 2015
Kommentiert: Amr Hashem
am 18 Sep. 2015
I have a data which is (4259*1 cell)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149192/image.jpeg)
i want to get its normal distribution and to calculate its mean and standard deviation to get a graph like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149194/image.png)
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?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 17 Sep. 2015
One option is to use the cell2mat function to define ‘data’ as a double array.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!