% % Written by: % -- % John L. Weatherwax 2006-08-28 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; clear; clc; bd = 3; u = linspace( -bd, +bd, 100 ); J1 = 10 + 15 * u + 5 * u.^2; J2 = 3 + 4 * u - 6 * u.^2 + 10 * u.^3; J3 = ( u - 1 ) .* ( u + 2 ) .* ( u - 3 ); J4 = exp( u ) + exp( -u ); h = plot( u, J1, u, J2, u, J3, u, J4 ); xlabel( 'u' ); ylabel('J'); legend( h, 'J_1(u)', 'J_2(u)', 'J_3(u)', 'J_4(u)', 'location', 'northwest' ); saveas( gcf, '../../WriteUp/Graphics/Chapter2/prob_1_J_plots', 'epsc' );