create multiple mat files for storing data

5 visualizaciones (últimos 30 días)
Ricky
Ricky el 11 de Jul. de 2013
Hello Everyone,
I am reading in data from a device and want to store it in a mat file. Currently I am directly storing my readings in a mat file using save command. I want to store these readings in multiple mat files for operational efficiency.
So for example I have 100 readings I want to create 10 mat files where each mat file contains 10 readings.
Thanks
  3 comentarios
Jan
Jan el 11 de Jul. de 2013
This is to vague to create an answer. We cannot know how your "10 readings" are represented in your program. So please add more details by editing the question.
Ricky
Ricky el 11 de Jul. de 2013
Sorry for the vague question actually my problem is I am saving cell arrays in my mat file. So my code reads the raw data from binary file saves that in a cell array and stores that cell array in mat file. I have predefined the size of cell array in which raw data is being parsed. While saving this data in mat file my MATLAB becomes very slow and I run into out of memory. So my idea was to create multiple mat files so that I can solve memory problem as I will be using less virutal memory. I am not sure if this the correct approach.

Iniciar sesión para comentar.

Respuesta aceptada

Titus Edelhofer
Titus Edelhofer el 11 de Jul. de 2013
Hi Ricky,
instead of creating multiple .mat files you might try to create one .mat file and access variables in there in parts (using the matfile object).
doc matfile
Titus
  1 comentario
Ricky
Ricky el 11 de Jul. de 2013
Hi Titus,
Actually the problem was that I was parsing my one row of input data and storing it. Then parsing the second row and storing it. This was causing this memory problems in MATLAB.
I have another question regarding out of memory error but I will ask in other thread.
Thanks for your time.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT Files en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by