I have a 1-by-565 struct array, GRID
, where each struct has five fields:
A
B
C
D
E
Each field has some value and now I need to add a sixth field, G
, to every element in GRID
. I tried:
GRID(:).G=addfield(G,[])
GRID(:).G=[]
but that doesn't work. What I need is for GRID(1)
to yield
A
B
C
D
E
G
where each has a double value assigned to it.