Revision 36:3ea506487b3b MAP

View differences:

MAP/MAP1_14.m
353 353
synapse_power=IHCpreSynapseParams.power;
354 354

  
355 355
% tauCa vector is established across channels to allow vectorization
356
%  (one tauCa per channel). Do not confuse with ANtauCas (one pre fiber type)
356
%  (one tauCa per channel). 
357
%  Do not confuse with ANtauCas vector (one per fiber type)
357 358
tauCa=repmat(ANtauCas, nBFs,1);
358 359
tauCa=reshape(tauCa, nANchannels, 1);
359 360

  
......
770 771

  
771 772
    %% synapse -----------------------------
772 773
    % Compute the vesicle release rate for each fiber type at each BF
773
    % replicate IHC_RP for each fiber type
774
    
775
    % replicate IHC_RP for each fiber type to obtain the driving voltage
774 776
    Vsynapse=repmat(IHC_RP, nANfiberTypes,1);
775 777

  
776 778
    % look-up table of target fraction channels open for a given IHC_RP
777 779
    mICaINF=    1./( 1 + exp(-gamma  * Vsynapse)  /beta);
778
    % fraction of channel open - apply time constant
780
    
781
    % fraction of channels open - apply time membrane constant
779 782
    for idx=1:segmentLength
780 783
        % mICaINF is the current 'target' value of mICa
781 784
        mICaCurrent=mICaCurrent+(mICaINF(:,idx)-mICaCurrent)*dt./tauM;
782 785
        mICa(:,idx)=mICaCurrent;
783 786
    end
784

  
787
    
788
    % calcium current
785 789
    ICa=   (GmaxCa* mICa.^3) .* (Vsynapse- ECa);
786

  
790
    % apply calcium channel time constant
787 791
    for idx=1:segmentLength
788 792
        CaCurrent=CaCurrent +  ICa(:,idx)*dt - CaCurrent*dt./tauCa;
789 793
        synapticCa(:,idx)=CaCurrent;
......
801 805
    %     end
802 806

  
803 807

  
804
    %% AN
808
    %% AN -------------------------------
805 809
    switch AN_spikesOrProbability
806 810
        case 'probability'
807
            % No refractory effect is applied
808 811
            for t = 1:segmentLength;
809 812
                M_Pq=PAN_M-Pavailable;
810 813
                M_Pq(M_Pq<0)=0;
......
834 837
            
835 838
            %% Apply refractory effect
836 839
               % the probability of a spike's occurring in the preceding
837
               %  refractory window (t= tnow-refractory period to tnow-)
840
               %  refractory window: t= (tnow-refractory period) :dt: tnow
838 841
               %    pFired= 1 - II(1-p(t)),
839 842
               % we need a running account of cumProb=II(1-p(t))
840 843
               %   cumProb(t)= cumProb(t-1)*(1-p(t))/(1-p(t-refracPeriod))
......
850 853
               % not the relative refractory period. To approximate this it
851 854
               % is necessary to extend the refractory period by 50%
852 855

  
853

  
854 856
                for t = segmentStartPTR:segmentEndPTR;
855 857
                    if t>1
856 858
                    ANprobRateOutput(:,t)= ANprobRateOutput(:,t)...
......
867 869
%                 figure(88), plot(cumANnotFireProb'), title('cumNotFire')
868 870
%                 figure(89), plot(ANprobRateOutput'), title('ANprobRateOutput')
869 871

  
870
            %% Estimate efferent effects. ARattenuation (0 <> 1)
872
            %% Estimate efferent effect:  0 < ARattenuation > 1
871 873
            %  acoustic reflex
872 874
            [r c]=size(ANrate);
873 875
            if r>nBFs % Only if LSR fibers are computed

Also available in: Unified diff