#pragma rtGlobals=3 // Use modern global access method and strict wave access. Menu "Macros" "Trace selection from 2D wave", trace_selection() end Function trace_selection() //load a wave from a data file Wave load_wave, trace_sel load_wave_from_file() //gives to the user the possibility to decide between manual or algorithmic selection Variable x Prompt x, "Insert 0 for manual selecion or 1 for algorithmic selection" Doprompt "Decide between manual or algorithmic selection", x if(V_flag==1) abort "Cancel was pressed, process aborted" elseif(x == 0) print "Manual selection was chooses" Select_traces_manually(load_wave) //manual selection elseif(x == 1) print "Algorithmic selection was chooses" Select_traces_algorithm1(load_wave) //algorithmic selection else abort "x was different from 0 or 1, process aborted" endif Movie_projector_from2Dmatrix2(trace_sel) end