function [] = prob_13_11_d() % % Written by: % -- % John L. Weatherwax 2006-09-06 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; % the state "v" is defined as v = (q,u): % v_l = [ 0.5 -1 ]; v_r = [ 1 1 ]; q = linspace( 0.01, 2, 100 ); figure; hold on; % plot the state v_l: % hsvl = plot( v_l(1), v_l(2), 'b.', 'MarkerSize', 15 ); % plot one-integral/Hugoniot curves through v_l: % qu_prod = v_l(1)*v_l(2); u1 = qu_prod ./ q; hvlc = plot( q, u1, '-b' ); % plot the state v_r: % hsvr = plot( v_r(1), v_r(2), 'r.', 'MarkerSize', 15 ); % plot two-integal/Hugoniot curves through v_r: % u2 = repmat(v_r(2),1,length(q)); hvrc = plot( q, u2, '-r' ); % Add some labels: % axis( [ 0 2 -15 5 ] ); xlabel( 'q' ); ylabel( 'u' ); grid on; legend( [ hsvl hvlc hsvr hvrc ], { ... '(q_l,v_l)', 'wave curve through v_l', ... '(q_r,v_r)', 'wave curve through v_r' }, 'Location', 'SouthEast' ); saveas( gcf, 'prob_13_11_pt_d.eps', 'psc2' );