Revision 18:e9e263e4fcde multithreshold 1.46/testAN.m
| multithreshold 1.46/testAN.m | ||
|---|---|---|
| 6 | 6 |
global IHC_VResp_VivoParams IHC_cilia_RPParams IHCpreSynapseParams |
| 7 | 7 |
global AN_IHCsynapseParams |
| 8 | 8 |
|
| 9 |
global ANoutput ANdt CNoutput ICoutput ICmembraneOutput tauCas |
|
| 10 |
global ARattenuation MOCattenuation |
|
| 11 |
|
|
| 9 | 12 |
dbstop if error |
| 10 | 13 |
|
| 11 | 14 |
addpath (['..' filesep 'MAP'], ['..' filesep 'utilities'], ... |
| ... | ... | |
| 47 | 50 |
set(gcf,'position',[980 356 401 321]) |
| 48 | 51 |
figure(5), clf |
| 49 | 52 |
set(gcf,'position', [980 34 400 295]) |
| 50 |
set(gcf,'name',[num2str(BFlist), ' Hz']); |
|
| 51 | 53 |
drawnow |
| 52 | 54 |
|
| 53 | 55 |
%% guarantee that the sample rate is at least 10 times the frequency |
| ... | ... | |
| 93 | 95 |
MAPparamsName=experiment.name; |
| 94 | 96 |
showPlotsAndDetails=0; |
| 95 | 97 |
|
| 96 |
global ANoutput ANdt CNoutput ICoutput ICmembraneOutput tauCas |
|
| 97 |
global ARattenuation MOCattenuation |
|
| 98 | 98 |
|
| 99 | 99 |
MAP1_14(inputSignal, 1/dt, BFlist, ... |
| 100 | 100 |
MAPparamsName, AN_spikesOrProbability); |
| ... | ... | |
| 127 | 127 |
hold on, bar(PSTHtime,PSTHLSR,'r') |
| 128 | 128 |
ylim([0 1000]) |
| 129 | 129 |
xlim([0 length(PSTH)*localPSTHbinwidth]) |
| 130 |
set(gcf,'name',[num2str(BFlist), ' Hz: ' num2str(leveldB) ' dB']); |
|
| 130 | 131 |
|
| 131 | 132 |
% AN - CV |
| 132 | 133 |
% CV is computed 5 times. Use the middle one (3) as most typical |
| ... | ... | |
| 188 | 189 |
AR(levelNo)=min(ARattenuation); |
| 189 | 190 |
MOC(levelNo)=min(MOCattenuation(length(MOCattenuation)/2:end)); |
| 190 | 191 |
|
| 191 |
time=ANdt:ANdt:ANdt*size(ICmembraneOutput,2);
|
|
| 192 |
time=dt:dt:dt*size(ICmembraneOutput,2);
|
|
| 192 | 193 |
figure(5), subplot(2,2,4) |
| 193 | 194 |
plot(time,ICmembraneOutput(2, 1:end),'k') |
| 194 | 195 |
ylim([-0.07 0]) |
Also available in: Unified diff