Append an array inside a mat file without loading

4 visualizzazioni (ultimi 30 giorni)
Steve
Steve il 24 Ott 2011
Hello, I was wondering if anybody knew of a way to append an array (in this case, a struct array) that has been saved to a mat file without loading the array into memory first. Here's a simple example of what I mean:
1) Create a struct array in a .mat file:
myStruct(1).name='Measurement2'; myStruct(1).type='double'; myStruct(1).value=2.3; myStruct(2).name='Setting'; myStruct(2).type='text'; myStruct(2).value='High'; save('myFile', 'myStruct')
2) Do other things (close Matlab, have coffee, load new data)
3) Look at new data
newStruct.name='Color'; newStruct.type='text'; newStruct.value='Blue';
...how could this get saved as an append to myStruct (e.g. myStruct(3)) inside myFile.mat? The -append switch on the save function causes the entire myStruct array to be replaced by the new one, which I do not want.
Any help is greatly appreciated, thanks!

Risposte (1)

Fangjun Jiang
Fangjun Jiang il 24 Ott 2011
The answer is no unless you've got the latest and greatest version of MATLAB.

Categorie

Scopri di più su Structures in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by