#!/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"