Revision 23:6cce421531e2 testPrograms/demoTwisterSpikes.m

View differences:

testPrograms/demoTwisterSpikes.m
1 1
function demoTwisterSpikes
2 2

  
3 3
% MAPdemo runs the MATLAB auditory periphery model (MAP1_14) as far as
4
%  the AN (probabilities) or IC (spikes) with graphical output
4
%  IC (spikes) with graphical output
5 5

  
6
% Things you might want to change; #1 - #5
7 6

  
8 7
%%  #1 parameter file name
9 8
MAPparamsName='Normal';
......
11 10

  
12 11
%% #2 probability (fast) or spikes (slow) representation
13 12
AN_spikesOrProbability='spikes';
14
% or
15
% AN_spikesOrProbability='probability';
16 13

  
17 14

  
18 15
%% #3 pure tone, harmonic sequence or speech file input
19
signalType= 'tones';
20
duration=0.100;                 % seconds
21
duration=0.020;                 % seconds
22
sampleRate= 64000;
23
% toneFrequency= 250:250:8000;    % harmonic sequence (Hz)
24
toneFrequency= 2000;            % or a pure tone (Hz8
25

  
26
rampDuration=.005;              % seconds
27

  
28
% or
29 16
signalType= 'file';
30 17
fileName='twister_44kHz';
31
% fileName='new-da-44khz';
32 18

  
33 19

  
34 20
%% #4 rms level
......
42 28
lowestBF=250; 	highestBF= 8000; 
43 29
BFlist=round(logspace(log10(lowestBF), log10(highestBF), numChannels));
44 30

  
45
%   or specify your own channel BFs
46
% BFlist=toneFrequency;
47

  
48 31

  
49 32
%% #6 change model parameters
50 33
paramChanges=[];
51 34

  
52
% or
53
% Parameter changes can be used to change one or more model parameters
54
%  *after* the MAPparams file has been read
55
% This example declares only one fiber type with a calcium clearance time
56
% constant of 80e-6 s (HSR fiber) when the probability option is selected.
57
% switch AN_spikesOrProbability
58
%     case 'probability'
59
%         paramChanges={'IHCpreSynapseParams.tauCa=80e-6;'};
60
%     otherwise
61
%         paramChanges=[];
62
% end
63

  
64 35
%% delare showMap options
65 36
showMapOptions=[];  % use defaults
66 37

  
67 38
% or (example: show everything including an smoothed SACF output
68
    showMapOptions.showModelParameters=1;
39
    showMapOptions.printModelParameters=1;
69 40
    showMapOptions.showModelOutput=1;
70 41
    showMapOptions.printFiringRates=1;
71 42
    showMapOptions.showACF=0;
72
    showMapOptions.showEfferent=1;
43
    showMapOptions.showEfferent=0;
73 44

  
74 45
%% Generate stimuli
75 46

  
......
103 74
toc
104 75

  
105 76
% the model run is now complete. Now display the results
106
showMAP(showMapOptions)
77
UTIL_showMAP(showMapOptions)
107 78

  
108 79
toc
109 80
path(restorePath)

Also available in: Unified diff