Hello,
I want to copy the values of multiple fields in a structure to another structure at once (without loop). For example, suppose the following empty structure.
A.SM = []; p = repmat(A, 3, 1); % 3 is not fixed
Now, I want to copy the contents of another structure which is as follows:
X(1).SM(:)ans = 4 0 5 0 1 0 1 0ans = 5 3 0 4 1 1 0 2ans = 5 4 0 3 2 1 0 1
"p.SM = X(1).SM" does not work.
Many thanks for your help!
Best Answer