MATLAB: Time format conversion command

convert

This post is related to this thread:
If I want to convert
36:40.0
to
time in seconds, how do I do this?

Best Answer

t={'36:40.0' ,'37:40.0' ;'39:40.0' ,'31:40.0'}
out=cellfun(@(x) sum(cellfun(@str2double, regexp(x,'[:.]','split')).*[3600 60 1]),t)