How a read the particular character from a string?
显示 更早的评论
Kindly looking for help on a small question. any help is highly appreciated!!
I got this string in a format e.g. 13:30:00 which essentially display the time. Now I need to seperate 13, 30, 00 into 3 different string. Maybe we can use str2double to convert the string into double first so it will be more easily handled?
Thank you once again.
回答(1 个)
Sean de Wolski
2012-2-9
regexp('13:30:00',':','split') %split on ':'
2 个评论
Yu Wang
2012-2-9
Walter Roberson
2012-2-9
Possibly easier to convert the string time in to a serial date num, subtract from the clock() result, and multiply the result by 24*60*60 to get the difference in seconds.
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!