If date time matches to the minute then horizontally concatenate rows that match

1 view (last 30 days)
Example data:
I didn't write it correctly. But, assume that the first column is a datenum/datetime, etc. in order. In fact the data I have is in a timetable format. It would be preferable to work with just the timetable. datenum_1 = datenum_2 =/= datenum_3.
Task: concatinate rows one and two because datenums are equivalent. Leave row three alone.
Result: New timetable with two rows and 0-values filled in where needed.
Notes: The data is in 30 second and 1 minute intervals. When I say two datenums match that means to the minute value (i. e. 13:30:00 and 13:30:30).
A = [datenum_1 1 2;datenum_2 3 4; datenum_3 5 6]
C = [datenum_1 1 2 3 4; datenum_3 5 6 0 0]

Sign in to comment.

Answers (0)


Community Treasure Hunt

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

Start Hunting!