Updated 08/12/04
% This file will read three data files and plot the seismograms
clear
% Read the files
horNS= input('Enter horizontal north-south filename without .dat, with single quotes ');
load([horNS '.dat']);
hns = eval(horNS);
horEW = input('Enter horizontal east-west filename without .dat, with single quotes ');
load([horEW '.dat']);
hew = eval(horEW);
vert = input('Enter vertical filename without .dat, with single quotes ');
load([vert '.dat']);
ver = eval(vert);
freq = input('Enter the frequency at which the signal was recorded ');
fr = 1/freq;
vn=size(ver,1);
hnsn=size(hns,1);
hewn=size(hew,1);
vn=(vn*fr-fr);
hnsn=(hnsn*fr-fr);
hewn=(hewn*fr-fr);
% Set up time files
vertime=0:fr:vn;
hnstime=0:fr:hnsn;
hewtime=0:fr:hewn;
% Plot seisomograms
subplot(311), plot (vertime, ver);
ylabel ('Vertical');
subplot(312), plot (hnstime, hns);
ylabel ('Horizontal NS');
subplot(313), plot (hewtime, hew);
ylabel ('Horizontal EW');