% % Written by: % -- % John L. Weatherwax 2006-05-09 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; [ centPt, curv ] = readWC( 'rm_curv_l_test.dat' ); figure; plot( centPt(1), centPt(2), '.', 'MarkerSize', 20, 'MarkerFaceColor', 'b' ); hold on; hl = plot( curv(:,1), curv(:,2), '-' ); [ centPt, curv ] = readWC( 'rm_curv_r_test.dat' ); plot( centPt(1), centPt(2), '.r', 'MarkerSize', 20, 'MarkerFaceColor', 'r' ); hold on; hr = plot( curv(:,1), curv(:,2), '-r' ); legend( [ hl hr ], { 'left wave curve', 'right wave curve' }, 'location', 'best' ); axis( [ 0 1.3 -1. 3. ] ); xlabel( 'density \rho' ); ylabel( 'momentum \rho u' ); grid on; saveas( gcf, 'rm_curv.jpg', 'jpg' ); % Plot the wave profiles: [data]=load( 'xr_test.dat' ); x=data(:,1); r=data(:,2); figure; plot( x, r, '-o' ); axis( [ -1 +1 0.4 1.05 ] ); xlabel( 'x' ); ylabel( 'density \rho' ); grid on; saveas( gcf, 'xr_test.jpg', 'jpg' ); [data]=load( 'xm_test.dat' ); x=data(:,1); m=data(:,2); figure; plot( x, m, '-o' ); axis( [ -1 +1 0.4 1.05 ] ); xlabel( 'x' ); ylabel( 'momentum \rho u' ); grid on; saveas( gcf, 'xm_test.jpg', 'jpg' );