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: islinear.m
    path of file: ./repos/YALMIP/@sdpvar
    
    the code of the file until where you have to start completion: function sys=islinear(x)
%ISLINEAR Check if variable is linear       
%
% p = islinear(X)
%

    
function sys=islinear(x)
%ISLINEAR Check if variable is linear       
%
% p = islinear(X)
%
% X : SDPVAR object
% p : boolean 0/1

try
    sys = is(x,'linear');
catch
    disp('I have messed up something internally in YALMIP. Sorry...')
    disp('Type yalmip(''clear'') and re-define the problem.');
    disp(' ')
    disp('This problem typically occurs if you have SDPVAR variables in');
    disp('work-space, and call a function where you are using ')
    disp('the command yalmip(''clear''). When control is returned to');
    disp('the work-space, things are messed up...');
    error('Internal problems in YALMIP');
end