create multiple mat files for storing data

1 vue (au cours des 30 derniers jours)
Ricky
Ricky le 11 Juil 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 commentaires
Jan
Jan le 11 Juil 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 le 11 Juil 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.

Connectez-vous pour commenter.

Réponse acceptée

Titus Edelhofer
Titus Edelhofer le 11 Juil 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 commentaire
Ricky
Ricky le 11 Juil 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by