I have data for each milli second. How can I average the 1000 samples and convert in to 1 sec? I got 322 sec data. 1K samples for each second.

조회 수: 2 (최근 30일)
I am having 322759 rows. It means 322 seconds. How can I average the mili seconds data and convert in to seconds. I just want 322 rows(322 seconds). Accordingly the next column should also average up according to the time. Attaching a sample

답변 (3개)

Fangjun Jiang
Fangjun Jiang 2023년 4월 7일
Data=(1:25)';
Ten=10;
NofData=floor(length(Data)/Ten)*Ten;
temp=reshape(Data(1:NofData),Ten,[])
temp = 10×2
1 11 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9 19 10 20
av=mean(temp)
av = 1×2
5.5000 15.5000

埃博拉酱
埃博拉酱 2023년 4월 8일
You may want to use imresize:
Table=readmatrix('ms_to_sec.csv');
Table=imresize(Table,[322,2]);
Table(:,1)=1:322;

Walter Roberson
Walter Roberson 2023년 4월 8일

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by