% txvsout Driver script for xvsout [PHYS210-xvs-fda]
%
% Uses wave to generate the sample data. Use type wave and type twave 
% for more information.

tmax = 2.0;
lambda = 0.5;
level = 7;

al = 1.0;
x0l = 0.45;
deltal = 0.05;
ar = 0.5;
x0r = 0.55;
deltar = 0.1;
trace = 50;

fprintf('\nRunning wave at level %d\n',level);
tic
[x, t, u] = wave(tmax, level, lambda, al, x0l, deltal, ar, x0r, deltar, trace);
fprintf('\n');
toc
fprintf('\n');
fname=sprintf('txvsout.dat', level);
fprintf('Calling xvsout to write to %s\n', fname);
xvsout(fname , t, x, u);
fprintf('Checking for %s\n', fname);
system(sprintf('ls -lh %s', fname));
fprintf('\nDone.\n');
