How to make monthly analisys for descriptive statistics

I have a .txt file with lots of wind data in it, such as speed, direction, temperature etc. This data is tab-separated and is measured in 10 minutes intervals. Example of the data:
Date/Time Speed 82 m [m/s] Speed 82 m SD [m/s]
12/01/2010 16:40 11.228 0.560
12/01/2010 16:50 10.945 0.610
12/01/2010 17:00 11.003 0.432
12/01/2010 17:10 10.462 0.536
What I want is to make descriptive statistics of these data. But I'm a complete beginner in MATLAB. How can I read this in order to make monthly statistics such as mean, kurtosis etc?
Thanks in advance.

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2014년 5월 12일
f = fopen('your_data.txt');c = textscan(f,'%s %s %f %f');fclose(f);
[yyyy,mm] = datevec(c{1},'mm/dd/yyyy');
[a,b,c1] = unique([yyyy,mm],'rows','first');
subs1 = [repmat(c1,[2,1]),kron((1:2)',ones(numel(c1),1))];
val1 = cat(1,c{:,3:4});
mean1 = accumarray(subs1,val1,[],@mean);
kurtosis1 = accumarray(subs1,val1,[],@kurtosis);

질문:

2014년 5월 12일

답변:

2014년 5월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by