MATLAB: How to add hours:minutes in Matlab

hourstime

Let's say I have hours:minute data in format HH:MM, and want to do statistics with it. I want to have the data in minutes for instance to be able to do t-tests. How to go about this in Matlab? Thanks!

Best Answer

t='10:10';
minutes(duration(t, 'inputformat', 'hh:mm'))
ans = 610