Yes, you are right, in case if sel would be the indices this
would work. However in my case sel represent the labels to be
selected from the labeled matrix lab. Hence, I first would need to
get the indices of all objects in lab defined by sel.
ind=find(lab==sel) does not work
ind = find(lab==sel(1)); gives ind for all elements labeled with
as find does not handle arrays of different sizes (op1 is
301x301, op2 is 1x6) I need to loop it because simply enough I
just want to do find with all entries in lab defined in sel.
would do the trick.
As I want to avoid looping as much as possible I wanted to know
if there is a better way of handle the problem?