This seems rather obvious, but it is often the obvious things that are hardest to see...
Nothing in your for loop depends on the diamrod1 loop variable. In particular this line:
[r,t,R,T]=fv_trans_refl_2D_slabs(F, materials, d, pol);
will evaluate to the same thing every time round the loop. This still would not explain why only ct=3 stores a matrix, but it would explain why all matrices stored would be the same.