How to import multiple .csv files to MATLAB?
Ältere Kommentare anzeigen
So what I am trying to do is import a multiple .csv (spread sheets of data) to matlab, I just wondering if there's any way or a loop that can be set so I don't have to import it manurally?
P1 = importfiles('20181109_load_0.65_P1.csv', 1, 1440);
P2 = importfiles('20181109_load_0.65_P2.csv', 1, 1440);
P3 = importfiles('20181109_load_0.65_P3.csv', 1, 1440);
P4 = importfiles('20181109_load_0.65_P4.csv', 1, 1440);
P5 = importfiles('20181109_load_0.65_P5.csv', 1, 1440);
P6 = importfiles('20181109_load_0.65_P6.csv', 1, 1440);
P7 = importfiles('20181109_load_0.65_P7.csv', 1, 1440);
P8 = importfiles('20181109_load_0.65_P8.csv', 1, 1440);
Antworten (1)
Sean de Wolski
am 20 Nov. 2018
Bearbeitet: Sean de Wolski
am 20 Nov. 2018
Something along the lines of the following. You can control what you read in by setting datastore properties.
ds = datastore('*.csv')
T = readall(ds)
Kategorien
Mehr zu Use COM Objects in MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!