フィルターのクリア

Read .CSV file and remove lines

2 ビュー (過去 30 日間)
Jake Marvin
Jake Marvin 2018 年 10 月 6 日
回答済み: Star Strider 2018 年 10 月 6 日
I need to read in a .csv file that has 3 header lines and each line of data also ends in 'Speed 1' which is unwanted. I would like the data in just a double array with 4 columns.
  1 件のコメント
madhan ravi
madhan ravi 2018 年 10 月 6 日
In the csv file which you uploaded I see 5 different types of datas with different headers?

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

採用された回答

Star Strider
Star Strider 2018 年 10 月 6 日
This may be the least aesthetically appealing code I ever wrote. Its only redeeming factor is that ‘Result’ is the matrix you want:
[D,S,R] = xlsread('20lbin.csv');
S2 = S(4:end,:);
S3 = strsplit([S2{:}],'Speed 1')';
S4 = sscanf([S3{:}],'%f,');
Result = reshape(S4, 4, [])';

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by