Hi :)
I'm quite new in Matlab but I'm wondering if anyome could help me.
So, I have a list of fixation_onset and fixation_offset both of them with 19.953 columns and a timestamps_s list and I want to exactly do this but for all the columns. So that I will have the intersection between the first the first onset and offset, between the second and so on.
first_fixation_onset = find (timestamps_s >= fixation_onsets(1,:));
first_fixation_offset = find (timestamps_s <= fixation_offsets(1,:));
first_fixation_idx = intersect(first_fixation_onset,first_fixation_offset);
I've tried something like this but an error occurs regarding the usage of >= becasue the matrix dimensions do not agree (even if in the aboce example it worked)
for i_fixation_onsets = 1:length(fixation_onsets);
fixation_onsets_idx (i_fixation_onsets) = find (timestamps_s (:,i_fixation_onsets) >= fixation_onsets(:,i_fixation_onsets));
for i_fixation_offsets= 1:length(fixation_offsets);
fixation_offsets_idx (i_fixation_offsets)= find (timestamps_s (:,i_fixation_offsets) <= fixation_offsets(:,i_fixation_offsets));
end
end
Hope I've been enough clear :)