Hello, is there a way to write a such thing? class = [1 1 1 -1 -1 1]; [idx1, idx2] = find(class == 1; class == -1) thanks,