Import CSV with comma and colon

I have a CSV file I would like to import in Matlab in the following format:
1001,00:02:51,00:02:20,00:00:12,00:00:05,00:00:03,00:00:11,00:00:00 1002,00:02:51,00:02:38,00:00:05,00:00:03,00:00:04,00:00:00,00:00:00
How can I import this CSV so that both the commas and the colons are used as separators (i.e. obtain a 2x22 value matrix for this example?

답변 (1개)

Sean de Wolski
Sean de Wolski 2017년 4월 10일

0 개 추천

I'd just use the import tool. Hit import data and select that file or right click import on it.

댓글 수: 2

Victor
Victor 2017년 4월 10일
Thank you, that definitely works. However, as I have multiple CSV files I have to import I hope to make an easy script for this, is that also possible?
Sean de Wolski
Sean de Wolski 2017년 4월 14일
Under the import button there's a generate function button that does exactly this.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

질문:

2017년 4월 10일

댓글:

2017년 4월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by