MATLAB: How to relabel classes into one sub group

anotherclassesclassificationdifferentfitcsvmrelabeltemporary

Suppose I have 3 different classes below, how to I relabel 'versicolor' and 'virginica' into another class named 'abnormal' temporary because I want to do classification for 'setosa' and 'abnormal' using fitcsvm function first and later I will need to relabel the class again for another fitcsvm classifcation model.
Screenshot 2020-02-12 at 12.46.58 AM.png

Best Answer

load fisheriris
idx = ~ismember(species, 'setosa');
species(idx) = {'abnormal'};