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

3 次查看(过去 30 天)
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

采纳的回答

Nils Pelzer
Nils Pelzer 2021-11-5
it did solve my problem! thanks a lot!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by