Is there a way to extract the numeric data from these chars?
1 view (last 30 days)
Mathieu NOE on 25 Jan 2022
you can do that (will simply combine minutes and seconds into only seconds time vector)
but as your original data has resolution of 1 second only and many duplicates, so will the resulting time vector.
you must improve the time resolution of your data
tmp = str2double(split(Time,':'));
time_seconds = tmp(:,1)*60 + tmp(:,2);
More Answers (1)
Harry on 25 Jan 2022
Edited: Harry on 25 Jan 2022
The data inside of Time variable are in time format like mm:ss. You can use datetime to extract them.
new_T = datetime(Time(1:end),'InputFormat','mm:ss','Format','mm:ss')
timeDuration = new_T-new_T(1);
timeDuration_inSeconds = seconds(timeDuration)
timeDuration_inMintues = minutes(timeDuration)
I hope, it works for you.
Note: num2str() will convert number to string. The output will not be number.