create('axon');
%-------------------------------------------------------------------------------------------
global axon
%-------------------------------------------------------------------------------------------
axon.dia =10; % um diameter
axon.nseg =301; % change the number of segments
axon.Lmode =2;
axon.Linter_D =100;
axon.da_D =0.6;
axon.lnodal =1;
axon.dn_D =0.33;
axon.xyzi =[1 0 0]; % unitless
axon.xyzc =[0 0 0]; % um: the coordinate of the node at the center
insert(axon,'Schwarz')
%-------------------------------------------------------------------------------------------
pw=50;
delay=00;
Z=200;
cover_range =600; %mm
cath_dis =1.0;%mm
Amp=1;
%-------------------------------------------------------------------------------------------
%Iexstim([0 0 Z],-500,pw,delay) %(xyz(um),amp(uA),dur(us),delay(us))
cath_num= 1+2*round(cover_range/cath_dis/2);
cath_dis=cath_dis*1000;
Iexstim([-(cath_num-1)/2*cath_dis-cath_dis/2 0 Z], Amp,pw,delay) %(xyz(um),amp(uA),dur(us),delay(us))
for i=-(cath_num-1)/2:1:(cath_num-1)/2
Iexstim([ i*cath_dis 0 Z],-Amp,pw,delay) %(xyz(um),amp(uA),dur(us),delay(us))
Iexstim([cath_dis/2+i*cath_dis 0 Z], Amp,pw,delay) %(xyz(um),amp(uA),dur(us),delay(us))
end