Extract data (timestamps) from csv file

1 回表示 (過去 30 日間)
Sean Mark L
Sean Mark L 2020 年 3 月 3 日
編集済み: Turlough Hughes 2020 年 3 月 4 日
I have a CSV file containing ~14000 rows with hundreds of timestamps.
I am trying to extract all the timestamps from the attahced csv file. Any help with coding please will be appreiacted.
Thanks
  1 件のコメント
Rik
Rik 2020 年 3 月 3 日
What have you tried so far?

サインインしてコメントする。

採用された回答

Turlough Hughes
Turlough Hughes 2020 年 3 月 3 日
編集済み: Turlough Hughes 2020 年 3 月 4 日
You could read the file in as a character vector with fileread and then use regexp as follows:
filetext = fileread('Info.csv');
t = str2double(regexp(filetext,'(?<=Time=)\d*','Match')).';
  1 件のコメント
Sean Mark L
Sean Mark L 2020 年 3 月 4 日
Thank you, it worked perfectly. I could not get my head around how to do it but I understand now.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by