how to replace duplicates with mean value in a table

2 Ansichten (letzte 30 Tage)
Viktor G.
Viktor G. am 22 Jun. 2020
Kommentiert: Viktor G. am 22 Jun. 2020
I need to have a single value for every second of the time. Is there a simpler method of solving this without making for or while loops that compare every value to each other and then store the means in other table?
Sample =
10×4 table
Date Time Angle Speed
__________ __________ _____ _____
01/02/2014 '00:00:00' 62 3.6
01/02/2014 '00:00:00' 62 3.8
01/02/2014 '00:00:01' 60 4.1
01/02/2014 '00:00:01' 59 4.2
01/02/2014 '00:00:02' 58 4.3
01/02/2014 '00:00:02' 60 4.3
01/02/2014 '00:00:02' 64 4.3
01/02/2014 '00:00:03' 63 4.3
01/02/2014 '00:00:03' 61 4.3
01/02/2014 '00:00:04' 61 4.3
What i should get from this is
Sample =
10×4 table
Date Time Angle Speed
__________ __________ _____ _____
01/02/2014 '00:00:00' 62 3.7
01/02/2014 '00:00:01' 60 4.2
01/02/2014 '00:00:02' 61 4.3
01/02/2014 '00:00:03' 62 4.3
01/02/2014 '00:00:04' 61 4.3

Akzeptierte Antwort

madhan ravi
madhan ravi am 22 Jun. 2020

Weitere Antworten (0)

Kategorien

Mehr zu Dates and Time 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!

Translated by