convert string to number
显示 更早的评论
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
采纳的回答
更多回答(1 个)
Sean de Wolski
2012-2-21
s = '15:30:00';
sn = str2double(s(isstrprop(s,'digit')))
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!