% % Written by: % -- % John L. Weatherwax 2007-09-10 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; drawnow; clc; clear; delta = 0.2; rt = fsolve( @(x) chap_6_prob_20_fn(x), 0.1 ); fprintf( 'root found %10.6f\n', rt ); op = 200*( rt / (delta+rt) ) - ( 10 / (1-rt) ) * ( delta / ( delta + rt ) ); fprintf( 'optimal profit is %10.6f\n', op );