How to average every 10 values (row) for 73319 rows and save into other csv file
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
muhammad choudhry
am 23 Mär. 2021
Kommentiert: muhammad choudhry
am 10 Apr. 2021
Hi,
I have attached the csv file in which I have 2 columns and 73319, I want to average 10 values of column 2 and save into the new file until the 73319 row. I have a value every second and I and to average first 10 s value then next 10 s values hence save into the new csv. Can anyone help ?
0 Kommentare
Akzeptierte Antwort
David Hill
am 23 Mär. 2021
You only have 9 rows in the last grouping. What are you going to do there?
a=readmatrix('scurve3.csv');
b=mean(reshape([a(:,2);nan],10,[]),'omitnan');%I just added an nan to the last grouping
writematrix(b,'yournewName.csv');
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!