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: plotDrift.m
    path of file: ./repos/msdanalyzer/@msdanalyzer
    
    the code of the file until where you have to start completion: function varargout = plotDrift(obj, ha)
%%PLOTDRIFT Plot drift stored in this object.
%
% obj.plotDrift plots the calculated drift position in the
% current axes.
%
% obj.plotDrift(ha) plots the drift position in the axes
% specified by the handle ha.
%
% hp = obj.plotDrift(...) returns the plot handle for the
% created line.
%
% [hp, ha] = obj.plotDrift(...) also returns the axes handle.

    
function varargout = plotDrift(obj, ha)
%%PLOTDRIFT Plot drift stored in this object.
%
% obj.plotDrift plots the calculated drift position in the
% current axes.
%
% obj.plotDrift(ha) plots the drift position in the axes
% specified by the handle ha.
%
% hp = obj.plotDrift(...) returns the plot handle for the
% created line.
%
% [hp, ha] = obj.plotDrift(...) also returns the axes handle.

if obj.n_dim < 2 || obj.n_dim > 3
    error('msdanalyzer:plotDrift:UnsupportedDimensionality', ...
        'Can only plot drift for 2D or 3D problems, got %dD.', obj.n_dim);
end