From: Lorenzo Guerrasio on
Having a structured array such as

sa=struct('field_a',repmat({2},100,1),'field_b',repmat({10},100,1));

%it is easily possible to assign all values of a particular field to an ordinary vector

a=[sa(:).field_a];

%How to achieve the opposite assignment? Unfortunatly
%[sa(:).field_a]=a;
% is an inalid syntax.

%Does anybody know how to assign each component of a vector to a field of a %structured array?