How to add element to cell array directly in matfile?

I have got a matfile with cell array. So I want ta add the next element to my cell array, but I can't do something like I wrote below(see code), because the data is big and doing it in loop would be very expensive:
cell_array = m.cell_array; % m is matfile object containig cell
cell_array{end + 1} = c; % c is element which I want to add
save('filename', 'cell_array');
How can I do it directly without loading loading and saving the variable?

 Respuesta aceptada

Guillaume
Guillaume el 20 de Dic. de 2018
You can't do it directly. You have to load the whole cell array, modify it and write it back as you have done. The documentation is very clear on this:
"matfile does not support indexing into:
  • Cells of cell arrays"

Más respuestas (0)

Categorías

Preguntada:

el 20 de Dic. de 2018

Respondida:

el 20 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by