function [] = prob_3_4() % % Written by: % -- % John L. Weatherwax 2006-10-16 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; % Assign a speed of sound c_0: % c_0 = 1; % Assign the x-domain: % xs = linspace( -2, 4 ); t1 = abs((1-xs)/c_0); t2 = abs((2-xs)/c_0); % the intersection of the two: tstar = 1/(2*c_0); xstar = 3/2; figure; hold on; plot( xs, t1, '-o' ); plot( xs, t2, '-rx' ); text( xstar+0.15, tstar, '(x^*,t^*)' ); xlabel( 'x' ); ylabel( 't' ); %grid on; saveas( gcf, '../LeVeque_WU_FVM/Graphics/prob_3_4.eps', 'psc2' );