Hi I have a 20000×60 cell matrix I want to delete rows depend on repeated values from the first columns.
s = { 1 '2013-10-01' '05:35:00' '01:05:00' 2 '2013-10-01' '10:20:00' '00:00:00' 2 '2013-10-01' '10:20:00' '00:00:00' 3 '2013-10-01' '11:00:00' '00:40:00' 3 '2013-10-01' '11:00:00' '00:40:00' 3 '2013-10-01' '11:00:00' '00:40:00' 3 '2013-10-01' '11:00:00' '00:40:00' 5 '2013-10-01' '14:50:00' '00:50:00' 5 '2013-10-01' '14:50:00' '00:50:00' 6 '2013-10-01' '15:15:00' '01:15:00' 7 '2013-10-01' '15:55:00' '00:05:00' 7 '2013-10-01' '15:55:00' '00:05:00' 7 '2013-10-01' '15:55:00' '00:05:00' 7 '2013-10-01' '15:55:00' '00:05:00'}
the result should like:
s1 = 1 '2013-10-01' '05:35:00' '01:05:00'2 '2013-10-01' '10:20:00' '00:00:00'3 '2013-10-01' '11:00:00' '00:40:00'5 '2013-10-01' '14:50:00' '00:50:00'6 '2013-10-01' '15:15:00' '01:15:00'7 '2013-10-01' '15:55:00' '00:05:00'8 '2013-10-01' '19:00:00' '00:05:00'9 '2013-10-01' '19:10:00' '00:10:00'
I use unique for it but because the different type of data there is Error using cell/unique (line 85) Input A must be a cell array of strings."
Best Answer