Cannot append double array local function variable to an existing structured double
%My existing structure is a 103 X 4 double. I would like to add an additional column to make 103 x 5 double, by adding shoe size (column 5) to my curated list of store stock (103 X 4 table)
%shoe_size = (1,:) %column array calculated locally in function
newstruct = shoe_size
existing = userdata.shoe.brand;
values_cell = shoe_size;
for i = 1:numel(existing)
existing(i).(newstruct) = values_cell(i,5);
end%My existing structure is a 103 X 4 double. I would like to add an additional column to make 103 x 5 double, by adding shoe size (column 5) to my curated list of store stock (103 X 4 table)
%shoe_size = (1,:) %column array calculated locally in function
newstruct = shoe_size
existing = userdata.shoe.brand;
values_cell = shoe_size;
for i = 1:numel(existing)
existing(i).(newstruct) = values_cell(i,5);
end %My existing structure is a 103 X 4 double. I would like to add an additional column to make 103 x 5 double, by adding shoe size (column 5) to my curated list of store stock (103 X 4 table)
%shoe_size = (1,:) %column array calculated locally in function
newstruct = shoe_size
existing = userdata.shoe.brand;
values_cell = shoe_size;
for i = 1:numel(existing)
existing(i).(newstruct) = values_cell(i,5);
end structures, for loop, arrays MATLAB Answers — New Questions