What's the best way to save very large cell arrays?

Hi - I have a psychology experiment which uses an eyetracker, reading data from the eyetracker on each of about 200 trials. The data that is read in can vary in length given the variable time in which participants can take to respond on a trial. Recordings are made every 3 ms, so the number of rows stored is between 1000 and 5000 on each trial.
My ideal solution would be to have this stored in a cell array, with each row of the cell array dedicated to each trial and the columns dedicated to different aspects of the data (left eye, right eye, timestamp etc).
The problem I am facing is that the cell array becomes large in size very quickly and therefore takes a long time to save. Ideally I want to save after every trial to keep a record of the data in case the program crashes, power fails etc.
Since the matfile function (save/load parts of files) doesn't allow access to cell arrays or structures, I am currently faced with two options:
1. Save a uniquely named cell for each trial, dynamically naming the cell based on the trial. I'd then have to recombine the cells into one at the end of the script and delete the temporary variables. This seems messy.
2. Save the data later in one go, but as I said, this is not ideal.
Does anyone have a better solution?

Answers (0)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Asked:

on 11 May 2013

Community Treasure Hunt

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

Start Hunting!