Filter löschen
Filter löschen

Import and saving .csv files as cell array via for loop

3 Ansichten (letzte 30 Tage)
Nils Pelzer
Nils Pelzer am 4 Nov. 2021
Beantwortet: Nils Pelzer am 5 Nov. 2021
I have to import 12 large (800mb) .csv files. They all contain 22 columns which I only need 2 of. They have close to 5 million rows. i used a for loop and the import of the data is no problem. the only problem i have is that iˋm not able to save the cell array as a .mat file cause its too large. I tried doing it via '-v 7.8' but even then it doesnt work. is there a way to solve this? The thing is, if i only run the for loop for 1 file, and save it in the cell array, the size is only about 27mb. but if i add one more file to the cell, its already about 3gb large. what am i doing wrong?
i was trying not to use eval and safe each file by itself but is it possible to do this with this kinda files?
i attached my code.
i know i'm a matlab beginner, so please dont judge me. i would be grateful if someone could help me out.
greetings nils
  2 Kommentare
Nils Pelzer
Nils Pelzer am 4 Nov. 2021
thanks a lot! i will try this tomorrow and let you know if it worked. but i think this could solve my problem.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Nils Pelzer
Nils Pelzer am 5 Nov. 2021
it did solve my problem! thanks a lot!

Weitere Antworten (0)

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by