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: f_PickSeisRec_IC.m
    path of file: ./repos/NDCP/Code
    
    the code of the file until where you have to start completion: function f_PickSeisRec(hObj,event) %#ok<INUSD>
% f_PickSeisRec:    For SEISMOGRAMS, user can pick dispersion curve. 
%                   For the picking, user must click and hold where the
%                   dispersion of surface waves phenomena appear. Once the
%                   user finish, just release.
    valnull = get(hObj,'Value');

    time    = evalin('base', 'time');
    dist    = evalin('base', 'dist');
    dt      = evalin('base', 'dt');

    
function f_PickSeisRec(hObj,event) %#ok<INUSD>
% f_PickSeisRec:    For SEISMOGRAMS, user can pick dispersion curve. 
%                   For the picking, user must click and hold where the
%                   dispersion of surface waves phenomena appear. Once the
%                   user finish, just release.
    valnull = get(hObj,'Value');

    time    = evalin('base', 'time');
    dist    = evalin('base', 'dist');
    dt      = evalin('base', 'dt');
    kreg    = evalin('base', 'kreg');    
    pathsac = evalin('base', 'pathsac');
    sacfiles= evalin('base', 'sacfiles');   
    minvel  = evalin('base', 'minvel'); 
    maxvel  = evalin('base', 'maxvel');
    respix  = get(0,'ScreenSize');
    fontesc10 = round(10*sqrt(respix(3)^2+respix(4)^2)/2202);
    
    namesac=[pathsac,sacfiles(kreg).name];
    trace=rdsac(namesac);    
    trace=trace.d;   
    trace=f_Taper(trace,0.005);   
    
	Tmin    = evalin('base', 'Tmin');
    Tmax    = evalin('base', 'Tmax');
    filt    = evalin('base', 'filt');
    fstep   = evalin('base', 'fstep');
    width   = evalin('base', 'width');
    filterorder= evalin('base', 'filterorder');    
    [~,ENV,fcm]    =   f_FTAN_Env(trace,dt,1/Tmax,1/Tmin,filt,fstep,width,filterorder);
    ENVT=ENV(:,length(fcm):-1:1); 
    T=1./fcm;   T=T(length(T):-1:1);    vel=dist./time;
    [VEL,logTT]     =   meshgrid(dist./time,log10(T));
    
    RESCALE=5;
    dt=dt*RESCALE;
    trace=resample(double(trace),1,RESCALE);  
    time=linspace(min(time),max(time),length(trace));
	ENV=resample(double(ENV),1,RESCALE); 
    [TIME,logFF]    =   meshgrid(time,log10(fcm));
    
    subplot(3,4,[3:4,7:8]),cla,hold off
    pcolor(TIME,logFF,ENV'),shading interp,hold on,grid on
    axis([0 max(time) min(log10(fcm)) max(log10(fcm))])
    title('\bf  *** PICK HERE *** '),xlabel('\bf TIME [s]')

    %% PICKING THE MAXIMUM AMPLITUDE ON DISPERSED WAVES
    
    % If you want to delete previous point, press BACKSPACE.
    % For end