Fall Seismograph Plotting Program

Fall '96 Seismograph Plotting program

Updated 08/12/04

The following program was written to plot the data from the 1996 MVHS Earthquake Simulation Project. This program reads three files and generates plots. It also allows the user to enter the frequency at which the data was recorded saving future users the annoying task of changing all the time constants.
% 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');