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: export_ang.m
    path of file: ./repos/mtex/EBSDAnalysis/@EBSD
    
    the code of the file until where you have to start completion: function export_ang(ebsd,fName,varargin)
% Export EBSD data to TSL/EDAX text file (ang).
%
% Syntax
%
%   % import an ctf file
%   ebsd = EBSD.load('myfile.ctf')
%
%   % export as ang
%   export_ang(ebsd,'myFile.ang')
%
% Input
%  ebsd  - @EBSD
%  fName - Filename, optionally including relative or absolute path
%
% Flags
%  flipud - Flip ebsd spatial data upside down (not the orientation data)
%  fliplr - Flip ebsd spatial data left right (not the orientation data)
%


OIMSymId = [100 101 ... triclinic
  135:137 132:134 102:104 ... 3  .. 11 monoclinic (a,b,c)
  105 106 106 106 107  ...    12 .. 16 orthorhombic
  115 116 117:119 117:119,... 17 .. 24 trigonal
  108:113 113 114 ...         25 .. 32 tetragonal
  120:125 125 126 ...         33 .. 40 hexagonal 
  127:131];                  %41 .. 45 cubic

roundOff = 3; %Rounding coordinates to 'roundOff' digits

scrPrnt('SegmentStart','Exporting ''ang'' file');

    
function export_ang(ebsd,fName,varargin)
% Export EBSD data to TSL/EDAX text file (ang).
%
% Syntax
%
%   % import an ctf file
%   ebsd = EBSD.load('myfile.ctf')
%
%   % export as ang
%   export_ang(ebsd,'myFile.ang')
%
% Input
%  ebsd  - @EBSD
%  fName - Filename, optionally including relative or absolute path
%
% Flags
%  flipud - Flip ebsd spatial data upside down (not the orientation data)
%  fliplr - Flip ebsd spatial data left right (not the orientation data)
%


OIMSymId = [100 101 ... triclinic
  135:137 132:134 102:104 ... 3  .. 11 monoclinic (a,b,c)
  105 106 106 106 107  ...    12 .. 16 orthorhombic
  115 116 117:119 117:119,... 17 .. 24 trigonal
  108:113 113 114 ...         25 .. 32 tetragonal
  120:125 125 126 ...         33 .. 40 hexagonal 
  127:131];                  %41 .. 45 cubic

roundOff = 3; %Rounding coordinates to 'roundOff' digits

scrPrnt('SegmentStart','Exporting ''ang'' file');

% pre-processing
scrPrnt('Step','Collecting data');

ebsd.phaseMap = ebsd.phaseMap - (min(ebsd.phaseMap)+1); %Adapt *.ang phase map convention
if check_option(varargin,'flipud') %Flip spatial ebsd data
  ebsd = flipud(ebsd);
  scrPrnt('Step','Flipping EBSD spatial data upside down');
end