As I understand it when you store data in structs you are storing 2 things
1. The matrix/variable
2. The address of the memory/struct link (i.e. in.fieldA for example)
So when you change one field -> that field changes -> i.e. you create a new variable and the memory address changes. See this example below:
a.one = zeros(10000,10000);
a.two = zeros(10000,10000);
b = a;
fprintf ( 2, 'b == a -> share same memory\n' );
fprintf ( 2, '\n Now change one field only in b\n' );
b.two = ones(10000,10000);
When the two fields in a have been created we are using 1.6GB (the size of the var from whos and confirmed by the memory taken by matlab (from memory).
from whos b is also taking up 1.6GB -> but we know that they are the same physical memory location due to copy on write - as you stated.
Now when we change one of the fields in b we can check the increase in memory usage (in the above example by ~.8GB) and we see that the total memory usage increases only by the new single field in b (again by ~.8GB).
From this we can summise that in your example the fieldA in out will be created new (and take up new memory) but any other fields will retain the same memory location as the input variable in.