how to plot a normal distribution and calculate mean and standard deviation ?

8 ビュー (過去 30 日間)
Amr Hashem
Amr Hashem 2015 年 9 月 17 日
コメント済み: Amr Hashem 2015 年 9 月 18 日
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?

採用された回答

Star Strider
Star Strider 2015 年 9 月 17 日
One option is to use the cell2mat function to define ‘data’ as a double array.

その他の回答 (1 件)

Image Analyst
Image Analyst 2015 年 9 月 17 日
Try using ndata instead of alldata.

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by