1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/sh
traceprefl="ft-fm-trace_noheadings"; # leftgoing p-pol tracepos 1
tracesrefl="ft-gp-trace_noheadings"; # leftgoing s-pol tracepos 1
traceptrns="ft-fp-trace_noheadings"; # rightgoing p-pol tracepos 7
tracestrns="ft-gm-trace_noheadings"; # rightgoing s-pol tracepos 7
commando="exit;";
for t in $1*
do
if [ -e $t ]
then
commando=" cd ../../postpost; "$commando;
if [ -f "$t/Post/$traceprefl" ]
then
commando="a=load('$traceprefl'); plot_spectra(a,1,2,'p_refl',100); "$commando;
fi
if [ -f "$t/Post/$traceptrns" ]
then
commando="a=load('$traceptrns'); plot_spectra(a,1,8,'p_trns',100); "$commando;
fi
if [ -f "$t/Post/$tracesrefl" ]
then
commando="a=load('$tracesrefl'); plot_spectra(a,1,2,'s_refl',100); "$commando;
fi
if [ -f "$t/Post/$tracestrns" ]
then
commando="a=load('$tracestrns'); plot_spectra(a,1,8,'s_trns',100); "$commando;
fi
commando="cd "$t"/Post/; "$commando;
fi
done
#export DISPLAY=:0.0
matlab -nodesktop -nosplash -r "$commando"
|