%% Calling program for Problem 6_2 %% Calls P6_2 which calls P6_2 fun %% Carol Lucas format compact mess='Part A' init=[1;0];alpha=1,I1=0;I2=0; [t,x1]=P6_2(alpha,init,I1,I2); alpha=.1 [t,x2]=P6_2(alpha,init,I1,I2); figure(2);clf;plot(t,x1,t,x2,'*-'); xlabel('time');title('Comparison of alpha=1 and alpha=.1 (*s)'); mess='Hit return to continue.' pause; mess='Part B' alpha=.001 [t,x3]=P6_2(alpha,init,I1,I2); alpha=0 [t,x4]=P6_2(alpha,init,I1,I2); figure(3);clf;plot(t,x3,t,x4,'*'); xlabel('time');title('Comparison of alpha=.001 and alpha=0 (*s)'); mess='Hit return to continue.' pause; mess='Part C' init=[0;1],alpha=1,I1=0;I2=0; [t,x5]=P6_2(alpha,init,I1,I2); alpha=.1 [t,x6]=P6_2(alpha,init,I1,I2); figure(4);clf;plot(t,x5,t,x6,'*'); xlabel('time'); title('Comparison of alpha=1 and alpha=.1 (*s) with ICs switched'); mess='Hit return to continue.' pause; figure(5);plot(t,x1,t,x5,'*-'); xlabel('time'); title('Comparison with ICs switched and alphs=1'); mess='Hit return to continue.' pause; figure(6);plot(t,x2,t,x6,'*-'); xlabel('time'); title('Comparison with ICs switched and alphs=.1'); mess='Hit return to continue.' pause; mess='Part D' alpha=1,init=[0;0],I1=1 [t,x7]=P6_2(alpha,init,I1,I2); L=length(t); Ratio1=x7(L,1)/x7(L,2) alpha=1,init=[0;0],I1=0,I2=1 [t,x8]=P6_2(alpha,init,I1,I2); Ratio1=x7(L,1)/x7(L,2) Ratio2=x8(L,2)/x8(L,1), mess='Hit return to continue.' pause; alpha=.1,init=[0;0],I2=0,I1=1 [t,x9]=P6_2(alpha,init,I1,I2); alpha=.1,init=[0;0],I1=0,I2=1 [t,x10]=P6_2(alpha,init,I1,I2); Ratio3=x9(L,1)/x9(L,2) Ratio4=x10(L,2)/x10(L,1), mess='Hit return to continue.' pause; figure(7);plot(t,x7,t,x8,'*'); xlabel('time'); title('Comparison with Is switched, alphs=1 and VICs=0'); mess='Hit return to continue.' pause; figure(8);plot(t,x9,t,x10,'*'); xlabel('time'); title('Comparison with Is switched, alphs=.1 and VICs=0'); mess='Hit return to continue.' pause;