if (exist('A'))
  disp('yes variable A does exist');
end

A


