MATLAB: How to Set Value of a Structure as Cell Array

assignmentscell arraysnested structurestructures

I have a structure, DLG.standard.Z1P and I have a cell array of data, C (2740×360). I would like to put this cell array within the structure DLG.standard.Z1P. I have three of these cell arrays that correspond to Z1P, and I would like to assign them such that the length of DLG.standard.Z1P is three, where Z1P has three cell arrays, each of size 2740×360. Any ideas on how to go about this?
I tried something like
DLG.standard.Z1P(1)=C
but that does not work.
Doing
DLG.standard.Z1P(1)=1;
DLG.standard.Z1P(2)=1;
does what I want it to, however, instead of 1, I want the whole cell array, C, in that location.

Best Answer

DLG.standard.Z1P{1} = C;