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'};
sc1 = cellfun(@(x)num2str(x, '%.0f'), s(:,1));
[s1u, ia] = unique(sc1);
s1 = s(ia,:)
s1 =
[1.0000e+000] '2013-10-01' '05:35:00' '01:05:00'
[2.0000e+000] '2013-10-01' '10:20:00' '00:00:00'
[3.0000e+000] '2013-10-01' '11:00:00' '00:40:00'
[5.0000e+000] '2013-10-01' '14:50:00' '00:50:00'
[6.0000e+000] '2013-10-01' '15:15:00' '01:15:00'
[7.0000e+000] '2013-10-01' '15:55:00' '00:05:00'
Best Answer