You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: arHighlightY.m
    path of file: ./repos/d2d/arFramework3/Advanced
    
    the code of the file until where you have to start completion: % arHighlightY([jm], [jd], [jy], [jt])
% 
% Sets the highlight flag ar.model(jm).data(jd).highlight(jt,jy)=1
% This flag is used by arPlotY to highligh
    
function arHighlightY(jm,jd,jy,jt)
global ar
if(~exist('jm','var') || isempty(jm))
    jm = [];
end
if(~exist('jd','var') || isempty(jd))
    jd = [];
end
if(~exist('jy','var') || isempty(jy))
    jy = [];
end
if(~exist('jt','var') || isempty(jt))
    jt = [];
end

if(nargin>0)
    if(jm==0)
        arHighlightY
        return
    end
    
    if(length(jm)==1 && isempty(jd))
        jd = 1:length(ar.model(jm).data);
    end
    if(isempty(jy) && length(jm)==1 && length(jd)==1)
        jy = size(ar.model(jm).data(jd).yExp,2);
    end