% bio_phas.m % % b.w. bequette % (c) 19 July 96 % % generates phase-plane plots for the bioreactor % % set-up the axis limits % axis([0 1.75 0 5]); % % stable and unstable points for substrate % inhibition model % x1u = [0.9951]; x2u = [1.5122]; % x1s = [0;1.5302]; x2s = [4;0.1746]; % % place an 'x' on stable points % place a 'o' on unstable points % plot(x1u,x2u,'wo',x1s,x2s,'wx') % hold on % % select different initial conditions % x1 ranges from 0.1 to 1.5 (every 0.35) % x2 ranges from 0 to 5 (every 1.25) % total of 16 initial conditions % x1init = [0.1 0.45 0.8 1.15 1.5 0.1 0.45 0.8 1.15 1.5]; x2init = [ 0 0 0 0 0 5 5 5 5 5]; x1inita = [1.5 1.5 1.5 0.1 0.1 0.1]; x2inita = [1.25 2.5 3.75 1.25 2.5 3.75]; % x0 = [x1init x1inita;x2init x2inita]; % % ncol = number of initial conditions % [mrow,ncol] = size(x0); % % run simulations for each initial condition % for i = 1:ncol; % [t,x] = ode45('bio',0,30,[x0(:,i)]); % plot(x(:,1),x(:,2),'w') % end % xlabel('x1') ylabel('x2') hold off