% Morris_Lecar_fW.m % Simulations for Figure 2.10A % Parameters come from Table 2.4 with I=150 to match figure % User should be certain parameters are initialized with GMorris_Lecar_Init.m % Carol Lucas global Vk Vl Vca gca gk gl V1 V2 V3 V4 c phi tend Vinit Winit I W=input('Please enter fixed value for w (default =.35): '); if length(W)~=1; W=.35; end V=[-75:1:75]; minf=.5*(1+tanh((V-V1)/V2)); Ica=gca*minf.*(V-Vca); Ik=gk*W*(V-Vk); Ileak=gl*(V-Vl); Itotal=Ica+Ik+Ileak-I; figure(4);clf;plot([-75 75],[0 0],'k',V,Ica,':',V,Ik,'--',V,Itotal); xlabel('voltage (mV)');ylabel('current (pA)'); title(strcat('V vs currents, I=',num2str(I),' W=',num2str(W,2))); text(-60,200,'K+');text(20, -300,'CA2+');text(25, 100, 'total');pause;