The MATLAB family is not completely lacking in binary variables, but only in the form of GF2 (Galois Field) ... or things you could convince the symbolic engine to do if you were stubborn enough.
What it has for use with optimizers is variables that are constrained to be integers and for which you set lower bound 0 and upper bound 1. These can only be used in a few optimizers.
For linear programming see https://www.mathworks.com/help/optim/linear-programming-and-mixed-integer-linear-programming.html
Otherwise see
There is no way to create such a variable for the continuous optimizers such as fmincon()