This code illustrates how one vs all classification can be used using logistic regression on IRIS dataset. This code was part of my assignment, so you can apply many improvements and you can use the code in your own application. The main file for using this code is one_vs_all_log.m, this code will also help you visualize the decision boundary for all three classes using one vs all concept.
Sander Khowaja (2020). One vs all classification using Logistic Regression for IRIS dataset (https://www.mathworks.com/matlabcentral/fileexchange/58273-one-vs-all-classification-using-logistic-regression-for-iris-dataset), MATLAB Central File Exchange. Retrieved .