how to replace duplicates with mean value in a table

4 次查看(过去 30 天)
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

采纳的回答

madhan ravi
madhan ravi 2020-6-22

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by