フィルターのクリア

Creating a datastore from multiple .csv files with different variables

1 回表示 (過去 30 日間)
Matthijs Priester
Matthijs Priester 2017 年 2 月 14 日
コメント済み: Stephen23 2017 年 4 月 10 日
I have several dozen big data .csv files containing of three collumns; Date, time and a value. The date and time collumns are the same for every .csv file, but the value collumn is different and contains a different variable for each file.
I would like to make a datastore which combines all these .csv files, thus containing the date (first collumn), the time (second collumn) and the nth collumns containing the n number of variable values (n depending on amount of .csv files).
This can then be converted into a tall array for easy data handling purposes.
Does anyone have an idea how to make this happen? Or maybe a better solution for this problem? I tried making multiple datasets and combining these into one tall array, but this is not possible.
Thanks in advance!
  1 件のコメント
Stephen23
Stephen23 2017 年 4 月 10 日
How "big" are the files? Can all of the data be imported into MATLAB simultaneously, or is that not possible?

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

採用された回答

Mujahid Sultan
Mujahid Sultan 2017 年 4 月 10 日
location1 = fullfile('matlabroot','/home/user/filelocation'); ds = datastore({location1},'Type','csv',... 'FileExtensions',{'.txt','.csv','.xls'});
this will read all the files sequentially, then you can combine the values column.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by