Hi to all I have something like this
function res=newRessource (size) for k=1: size res.a(k).v1= val1; res.a(k).v2= val2; end
then i have
res1= newRessource (size1); res2= newRessource (size2);
After that in a for loop the content of the attributes of res1 are changed at each iteration and its size also and What i want to do, at the end of each iteration of the for loop, is to get the old content of res2 concatenated with the content of res1 because i will need to do some actions based on it later
I tried
res2 = [res2, res1];
but i get an error "Error using Horizcat Number of fields in structure arrays being concatenated do not match. Concatenation of structure arrays requires that these arrays have the same set of fields."
Any help on how to solve this? Thanks
Best Answer