https://nl.mathworks.com/help/finance/portfolio.settrackingerror.html
setTrackingError - Set up maximum portfolio tracking error constraint - MATLAB
This MATLAB function sets up a maximum portfolio tracking error constraint for a Portfolio object.
set upportfolio trackingmaximumerrorconstraint