faster reading using csvread question
2 ビュー (過去 30 日間)
古いコメントを表示
I have a csv file that looks like the below
_TYPE_ _NAME_ a b c d date
CRR a 1 0.778220822 0.711397234 0.29490149 4/30/2017
CRR b 1 0.778220822 0.711397234 0.29490149 4/30/2017
CRR d 1 0.778220822 0.711397234 0.29490149 4/30/2017
CRR e 1 0.778220822 0.711397234 0.29490149 4/30/2017
I would like to store the numeric values column a-d as a matrix the date column as a separte variable in form of a vector the name column as a separate variable in form of a vector.
the number of numeric columns can differ in this above example it is only 4 , but you can have varying number of columns, the last column is always the date and the first two columns are always type and name
I have been using xlsread for this but was wondering if there is a faster way using csvread or some other function
many thanks for your help
0 件のコメント
回答 (1 件)
Matthew Eicholtz
2017 年 5 月 22 日
Have you tried readtable? I haven't run any timing diagnostics to see which is faster, but that could be another option for you to try.
Here's an example function call:
T = readtable(filename,'Delimiter',',','ReadVariableNames',true);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で ActiveX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!