[Scilab-users] Array of struct

sgougeon at free.fr sgougeon at free.fr
Fri Mar 1 11:44:13 CET 2013


>pts(s+1:s+st) = temp(:) // pts($+1:$+st) can't be used, even with parentheses ($+1):($+st)

// but pts($+(1:st))  can! :

pts = struct();
temp(1).partnumber = 1;
temp(1).P = zeros(8,3);
temp(1).C = zeros(96,5);
temp(2).partnumber = 2;
temp(2).C = zeros(96,5);
temp(2).P = zeros(8,3);

st = size(temp,"*");
pts($+(1:st)) = temp(:)   // works



More information about the users mailing list