how to plot a normal distribution and calculate mean and standard deviation ?
조회 수: 7 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
Star Strider
2015년 9월 17일
One option is to use the cell2mat function to define ‘data’ as a double array.
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!