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: GUIEditTextualFileHeader.m
    path of file: ./repos/segymat/GUI
    
    the code of the file until where you have to start completion: function varargout = GUIEditTextualFileHeader(varargin)
% GUIEditTextualFileHeader : GUI for editing the SGY header
%
% Call : 
%   SH=GUIEditTextualFileHeader(SH);
%
%
% Example : 
%   [Data,STH,SH]=ReadSegy('841_m.sgy');
%   SH=GUIEditTextualFileHeader(SH);
%
%

% GUIEDITTEXTUALFILEHEADER M-file for GUIEditTextualFileHeader.fig
%      GUIEDITTEXTUALFILEHEADER, by itself, creates a new GUIEDITTEXTUALFILEHEADER or raises the existing
%      singleton*.
%
%      H = GUIEDITTEXTUALFILEHEADER returns the handle to a new GUIEDITTEXTUALFILEHEADE
    
function popType_Callback(hObject, eventdata, handles)
% hObject    handle to popType (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns popType contents as cell array
%        contents{get(hObject,'Value')} returns selected item from
%        popType
  UpdateText(hObject,handles)
  
  
  
function UpdateText(hObject, handles)  
  data=guidata(hObject);
  
  HeaderType=get(handles.popType,'Value');

  if HeaderType==1,
    txt=char(ebcdic2ascii(data.SegyHeader.TextualFileHeader));
  else
    txt=char(data.SegyHeader.TextualFileHeader');
  end