I have A, and want to remove first index from remain index
A={[1,2,3],[2,6,8,7],[4,5,6,7,8,9,10]};first_index=cellfun(@(v) find(v(1)),A,'uni',0);remain_index=cellfun(@(v) ~ismember(v(1),v),A,'uni',0); % I have problem in this part
result should be
first_index={[1],[1],[1]};remain_index={[2,3],[2,3,4],[2,3,4,5,6,7]} % remove first index
Best Answer