필터 지우기
필터 지우기

Mean and Standard deviation of cell Array column wise

조회 수: 2 (최근 30일)
Ahmad Bilal
Ahmad Bilal 2018년 9월 19일
댓글: Ahmad Bilal 2018년 9월 19일
Hi, I have 48x1 cell array that consists of decimal numbers. Now i want to take mean and standard deviation of this complete dataset. Can anybody suggest me what is the possible solution for that??? I have written the following code :
A = readtable('Sampledata.xlsx','Range','A1:A51');
tau_ground = table2array(A);
tau_ground(1:2)=[];
for i=1:48
M = str2double(cell2mat(tau_ground(i)));
end
result_avg = mean(M{:},1);
result_std = std(M);
  댓글 수: 2
Jan
Jan 2018년 9월 19일
Today I've selected your code with the mouse and pressed the "{} Code" button, such that it is readable. Please do this by your own in the future. Thanks.
Ahmad Bilal
Ahmad Bilal 2018년 9월 19일
Thank you for advice. I follow this in future

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2018년 9월 19일
A = readtable('Sampledata.xlsx','Range','A1:A51');
tau_ground = table2array(A);
M = str2double(tau_ground(3:end));
mean(M)
std(M)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by