|
Prev: mapping toolbox - pointz shapefile
Next: assigning a vector to the fields of a structured array
From: Lorenzo Guerrasio on 30 Jun 2010 11:44 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?
|
Pages: 1 Prev: mapping toolbox - pointz shapefile Next: assigning a vector to the fields of a structured array |