How do I remove leading digits in a .CSV
이전 댓글 표시
So I have a huge amount of data to process (in .csv form) and a product of the collection the time stamps come in the form of:
001 00:05:04:058299394
Matlab is not seeing this as a time or anything due to the 001 (day) mark on the front side of the stamp.
Is there a script or code that exists to remove this and get rid of the error that matlab is throwing.
답변 (2개)
dpb
2016년 4월 5일
0 개 추천
If you have recent release which includes the datetime class, then read it as a date with the D format descriptor. "DDD" is the day-of-year field descriptor for 3-digit DOY. See
<datetime-properties Format> and links therefrom...
If not, post back with a short sample of the data file...
Azzi Abdelmalek
2016년 4월 5일
s='001 00:05:04:058299394'
a=regexp(s,'(?<=\s+)\S+','match')
댓글 수: 2
Matthew Engquist
2016년 4월 7일
편집: Azzi Abdelmalek
2016년 4월 8일
Azzi Abdelmalek
2016년 4월 8일
v={'001 00:10:26.298066'
'001 00:10:26.303391'
'001 00:10:26.308716'
'001 00:10:26.314041'}
a= regexp(v,'(?<=\s+)\S+','match');
out=[a{:}]'
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!