MATLAB: Convert string to number

string

Hi I have a string array as following:
'15:30:00'
'15:30:01'
'15:30:02'
'15:30:03'
'15:30:04'
'15:30:05'
'15:30:06'
ETC…..
I want the out put to be like 153000
153001
153002
153003
etc,
any help

Best Answer

S = {'15:30:00'; '15:30:01'; '15:30:02'};
S = strrep(S, ':', '');
D = sscanf(sprintf('%s ', S{:}), '%d');