All examples for PROCMAT
# Interactive picking of times in earthquake records
# This call executes Octave program pick.m for each trace ensemble
# Prior to each run of pick.m, trace data and headers are loaded in
# workspace /tmp/pick.mat, and after the run, trace headers are read in
# from file /tmp/pick_out.txt
*call procmat ens octave -q pick.m
workdir /home/morozov/OCTAVE # switch to this directory before executing Octave codes
# file pick.m should be in this directory
# following the *call line,
# you can include arbitrary Matlab/Octave code
# which will be included at the end of temp_load_octave.m
# Just a random example setting iref=5 and plotting a sin() function shown here.
iref = 5;
t=[0:0.01:10];
plot(t,sin(2*pi*10*t));
# this creates a data loading script (in work directory) that can be used in pick.m
workin temp_load_octave.m
# this outputs trace data into temp_load_octave.m
traces 1 _tstrt_ 100 rec Station {stname}
# this outputs trace-header values into temp_load_octave.m
headers picks
ptime 1 P wave
stime 2 S wave
cstime 3 Coda start
cetime 4 Coda end
pgatime 5 PGA
# after the run of pick.m, this loads trace-header values from file.
# The file OCTAVE/temp_{count}_out.txt is supposed to be written by pick.m
fhdrout OCTAVE/temp_{count}_out.txt # file output from pick.m into trace headers
ptime 1
stime 2
ctstrt 3
ctend 4
# after the run of pick.m, this loads trace-sample records from another file
ftrcout DAT/temp_trcout.txt # Trace data output from pick.m
# and loaded back into trace records.