Updated 08/12/04
% This file will read two data files and plot the seismograms clear % Read the files radial= input('Enter radial filename without .dat, with single quotes '); load([radial '.dat']); rad = eval(radial); % load('rad.dat'); horizont = input('Enter horizontal filename without .dat, with single quotes '); load([horizont '.dat']); ver = eval(horizont); % load('ver.dat'); vn=size(ver,1); rn=size(rad,1); vn=(vn*0.005-0.005); rn=(rn*0.005-0.005); % Set up time files % Vertical time is 0.005 sec between vertime=0:0.005:vn; % Radial time is 0.005 sec between radtime=0:0.005:rn; % Plot seisomograms subplot(211), plot (vertime, ver); title ('Horizontal Wave'); xlabel ('Time'); ylabel ('Amplitude'); subplot(212), plot (radtime, rad); title ('Radial Wave'); xlabel ('Time'); ylabel ('Amplitude');