Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
Nils Pelzer
Nils Pelzer el 4 de Nov. de 2021
Respondida: Nils Pelzer el 5 de Nov. de 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 comentarios
Nils Pelzer
Nils Pelzer el 4 de Nov. de 2021
thanks a lot! i will try this tomorrow and let you know if it worked. but i think this could solve my problem.

Iniciar sesión para comentar.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by