I am trying t create an exact copy, duplicate, of an already created and populated array in Matlab. I grasp that I could just use a loop to copy all the fields, but isn't there an easier way?
The created array is an array of structs. My code so far is as follows.
Thank you for all your help in advance.
a = 1;
window = eye_record.x_pos_measured_deg; %zeros(length(eye_record));
disT = .50;
for i=1:length(eye_record)
%window(i) = eye_record(i).x_pos_measured_deg;
dis = (max(window(a:i)) - min(window(a:i)));
if (dis <= disT)
eye_record(i).xy_movement_EMD = 1;
fixation_counter = fixation_counter + 1;
else
eye_record(i).xy_movement_EMD = 2;
a = i;
saccade_counter = saccade_counter + 1;
end
end