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: loadPoleFigure_xrd.m
    path of file: ./repos/mtex/interfaces
    
    the code of the file until where you have to start completion: function pf = loadPoleFigure_xrd(fname,varargin)
% import data fom aachen xrd file
%
% Syntax
%   pf = loadPoleFigure_xrd(fname)
%
% Input
%  fname  - filename
%
% Output
%  pf - @PoleFigure
%
% See also
% ImportPoleFigureData loadPoleFigure

pf = PoleFigure;

% tokens
rhoStartToken = {'*MEAS_SCAN_START\s*"(\S*)"','*START\s*=\s*(\S*)'};
rhoStepToken = {'*MEAS_SCAN_STEP\s*"(\S*)"','*STEP\s*=\s*(\S*)'};
rhoStopToken = {'*MEAS_SCAN_STOP\s*"(\S*)"','*STOP\s*=\s*(\S*)'};
thetaToken = {'*MEAS_3DE_ALPHA_ANGLE\s*"(\S*)"','*PF_AANGLE\s*=\s*(\S*)'};


    
function pf = loadPoleFigure_xrd(fname,varargin)
% import data fom aachen xrd file
%
% Syntax
%   pf = loadPoleFigure_xrd(fname)
%
% Input
%  fname  - filename
%
% Output
%  pf - @PoleFigure
%
% See also
% ImportPoleFigureData loadPoleFigure

pf = PoleFigure;

% tokens
rhoStartToken = {'*MEAS_SCAN_START\s*"(\S*)"','*START\s*=\s*(\S*)'};
rhoStepToken = {'*MEAS_SCAN_STEP\s*"(\S*)"','*STEP\s*=\s*(\S*)'};
rhoStopToken = {'*MEAS_SCAN_STOP\s*"(\S*)"','*STOP\s*=\s*(\S*)'};
thetaToken = {'*MEAS_3DE_ALPHA_ANGLE\s*"(\S*)"','*PF_AANGLE\s*=\s*(\S*)'};

% read file
if check_option(varargin,'check')
  h = file2cell(fname,1000);
else
  h = file2cell(fname);
end