Given two struct arrays A and B with field f1:
A = struct('f1',{1,2,3})
B = struct('f1', {4,5,6})
you can assign the contents of the f1 fields of struct array A to the fields of B by
[B.f1] = A.f1
but I cannot figure out what to do if you want to perform arithmetics on the field, for instance if you want to store the negative of the f1 fields of A in B.
[B.f1] = -A.f1
does not work, you need to first concatenate the elements of A in order for the operator to work
-[A.f1]
but then the result is a vector, which somehow you need to "unwrap" in order to match the number of output arguments.