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: ERPLAB_ERP_Viewer.m
    path of file: ./repos/erplab/studio_functions/Functions/EStudio/ERP Tab/ERP wave viewer
    
    the code of the file until where you have to start completion: 
% New ERP viewer GUI Layout - Simple ERP viewer 0.014
%
% Author: Guanghui Zhang & Steve J. Luck & Andrew Stewart
% Center for Mind and Brain
% University of Cali
    
function  ERPLAB_ERP_Viewer(ALLERP,selectedERP_index,binArray,chanArray,Parameterfile)
tic;%
disp(' ERP Waveform Viewer is launching...');


global viewer_ERPDAT;
global gui_erp_waviewer;
ERPtooltype = erpgettoolversion('tooltype');
% global observe_ERPDAT;
% if ~strcmpi(ERPtooltype,'EStudio')
viewer_ERPDAT = v_ERPDAT;
% end