function VAR = MoveCluster(VAR,i_fish,sourceIDs,destIDs)
nClus = length(VAR(i_fish).ClusGroup{sourceIDs{1}});
clus_list = intersect(1:nClus,sourceIDs{2});

Source = VAR(i_fish).ClusGroup{sourceIDs{1}}(clus_list);

dest_clus_list = destIDs{2}(1:length(clus_list));
VAR(i_fish).ClusGroup{destIDs{1}}(dest_clus_list) = Source;

VAR(i_fish).ClusGroup{sourceIDs{1}}(clus_list) = [];
end
xiuyechen
github-repos/MATLAB/xiuyechen-FishExplorer/FishExplorer-c61392cf0835480d64fc03c15f1992935fdc7106/VAR manipulation/MoveCluster.m
FishExplorer
github-repos/MATLAB/xiuyechen-FishExplorer
c61392cf0835480d64fc03c15f1992935fdc7106