%% DEMONSTRATES Chapter 6 Figures 6 and 7 %% Calls 'mlsynfun' as ode, fanal to get frequency %% Carol Lucas mess='Program pauses after each figure. Hit return to continue.' init6_6=[-44;0;0;.3;0;.3]; init6_7=[-55;0;-20;0;0;0]; mess=' Cells connect at time = 200 ' alpha=3; beta=1; ton=200; bswitch=0; Titlegc=['alpha = ' num2str(alpha) ' beta = ' num2str(beta) ' bswitch= ' num2str(bswitch)]; [t,x]= ode45('mlsynfun',[0:1000],init6_6,[],alpha,beta,ton,bswitch); figure(1);clf;plot(t,x(:,1),t,x(:,3)); title(Titlegc); xlabel('time');ylabel('Voltages');pause; beat1V1=fanal(t,x(:,1)); figure(2);clf;plot(t,x(:,1),t,beat1V1); title([Titlegc [' Cell 1']]); xlabel('time');ylabel('Voltages & Inter Spike Intervals');pause; beat1V2=fanal(t,x(:,3)); plot(t,x(:,3),t,beat1V2); title([Titlegc [' Cell 2']]); xlabel('time');ylabel('Voltages & Inter Spike Intervals');pause; figure(2);plot(t,beat1V1,t,beat1V2); title(Titlegc); xlabel('time');ylabel('Inter Spike Intervals Comparisons');pause; beta=.1; Titlegc=['alpha = ' num2str(alpha) ' beta = ' num2str(beta) ' bswitch= ' num2str(bswitch)]; [t,x]= ode45('mlsynfun',[0:1000],init6_6,[],alpha,beta,ton,bswitch); figure(3);plot(t,x(:,1),t,x(:,3)); title(Titlegc); xlabel('time');ylabel('Voltages');pause; beat1V1=fanal(t,x(:,1)); beat1V2=fanal(t,x(:,3)); figure(4);plot(t,beat1V1,t,beat1V2); title(Titlegc); xlabel('time');ylabel('Voltages');pause; pause; beta=1;bswitch=.1;ton=200; Titlegc=['alpha = ' num2str(alpha) ' beta = ' num2str(beta) ' bswitch= ' num2str(bswitch)]; [t,x]= ode45('mlsynfun',[0:1200],init6_7,[],alpha,beta,ton,bswitch); figure(5);clf;plot(t,x(:,1),t,x(:,3)); title(Titlegc); xlabel('time');ylabel('Voltages');pause; beat1V1=fanal(t,x(:,1)); beat1V2=fanal(t,x(:,3)); figure(6);clf;plot(t,beat1V1,t,beat1V2); title(Titlegc); xlabel('time');ylabel('Voltages');pause;