comparison multithreshold 1.46/testOME.m @ 22:45f28c49461e master

removing duplicate changes
author Ray Meddis <rmeddis@essex.ac.uk>
date Mon, 13 Jun 2011 18:21:05 +0100
parents 5b23b9f11806
children 02aa9826efe0
comparison
equal deleted inserted replaced
21:c489ebada16e 22:45f28c49461e
21 21
22 figure(2), clf, subplot(2,1,1) 22 figure(2), clf, subplot(2,1,1)
23 set(2,'position',[5 349 268 327]) 23 set(2,'position',[5 349 268 327])
24 semilogx(HuberFrequencies, 20*log10(HuberDisplacementAt80dBSPL/1e-10),... 24 semilogx(HuberFrequencies, 20*log10(HuberDisplacementAt80dBSPL/1e-10),...
25 'ko', 'MarkerFaceColor','k', 'Marker','o', 'markerSize',6) 25 'ko', 'MarkerFaceColor','k', 'Marker','o', 'markerSize',6)
26 % Generate test stimulus ................................................................. 26 hold on
27 27
28 %% independent test using discrete frequencies 28 %% Generate test stimulus .................................................................
29
30 % independent test using discrete frequencies
29 peakResponses=[]; 31 peakResponses=[];
30 peakTMpressure=[]; 32 peakTMpressure=[];
31 frequencies=[200 400 HuberFrequencies 10000]; 33 frequencies=[200 400 HuberFrequencies 10000];
32 for toneFrequency=frequencies 34 for toneFrequency=frequencies
33 inputSignal=amp*sin(2*pi*toneFrequency*time); 35 inputSignal=amp*sin(2*pi*toneFrequency*time);
37 AN_spikesOrProbability='probability'; 39 AN_spikesOrProbability='probability';
38 % switch off AR & MOC (Huber's patients were deaf) 40 % switch off AR & MOC (Huber's patients were deaf)
39 paramChanges{1}='OMEParams.rateToAttenuationFactorProb=0;'; 41 paramChanges{1}='OMEParams.rateToAttenuationFactorProb=0;';
40 paramChanges{2}='DRNLParams.rateToAttenuationFactorProb = 0;'; 42 paramChanges{2}='DRNLParams.rateToAttenuationFactorProb = 0;';
41 43
42 global OMEoutput OMEextEarPressure TMoutput ARAttenuation 44 global OMEoutput OMEextEarPressure TMoutput ARattenuation
43 % BF is irrelevant 45 % BF is irrelevant
44 MAP1_14(inputSignal, sampleRate, -1, ... 46 MAP1_14(inputSignal, sampleRate, -1, ...
45 MAPparamsName, AN_spikesOrProbability, paramChanges); 47 MAPparamsName, AN_spikesOrProbability, paramChanges);
46 48
47 peakDisplacement=max(OMEoutput(floor(end/2):end)); 49 peakDisplacement=max(OMEoutput(floor(end/2):end));
48 peakResponses=[peakResponses peakDisplacement]; 50 peakResponses=[peakResponses peakDisplacement];
49 51
50 peakTMpressure=[peakTMpressure max(OMEextEarPressure)]; 52 peakTMpressure=[peakTMpressure max(OMEextEarPressure)];
51 disp([' greatest AR attenuation: ' num2str(min(ARAttenuation))]) 53 disp([' AR attenuation (dB): ' num2str(20*log10(min(ARattenuation)))])
52 end 54 end
53 55
54 %% Report 56 %% Report
55 disp('frequency displacement(m)') 57 disp('frequency displacement(m)')
56 % disp(num2str([frequencies' peakResponses'])) 58 % disp(num2str([frequencies' peakResponses']))
57 fprintf('%6.0f \t%10.3e\n',[frequencies' peakResponses']') 59 fprintf('%6.0f \t%10.3e\n',[frequencies' peakResponses']')
58 60
59 % stapes peak displacement 61 % stapes peak displacement
60 figure(2), subplot(2,1,1), hold on 62 figure(2), subplot(2,1,1), hold on
61 semilogx(frequencies, 20*log10(peakResponses/1e-10), 'r', 'linewidth',4) 63 semilogx(frequencies, 20*log10(peakResponses/1e-10), 'r', 'linewidth',4)
64 set(gca,'xScale','log')
62 % ylim([1e-11 1e-8]) 65 % ylim([1e-11 1e-8])
63 xlim([100 10000]), ylim([0 30]) 66 xlim([100 10000]), ylim([0 30])
64 grid on 67 grid on
65 title(['stapes at ' num2str(leveldBSPL) ' (NB deaf)']) 68 title(['stapes at ' num2str(leveldBSPL) ' (NB deaf)'])
66 ylabel('disp: dB re 1e-10m') 69 ylabel('disp: dB re 1e-10m')