To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
The primary repository for this project is hosted at git://github.com/rmeddis/MAP.git .
This repository is a read-only copy which is updated automatically every hour.
root / userProgramsRM / testDPOAE.m @ 38:c2204b18f4a2
History | View | Annotate | Download (638 Bytes)
| 1 | 38:c2204b18f4a2 | rmeddis | % testDPOAE |
|---|---|---|---|
| 2 | |||
| 3 | addpath (['..' filesep 'testPrograms']) |
||
| 4 | |||
| 5 | leveldB=60; |
||
| 6 | f1=3000; |
||
| 7 | frequencyDiffs=20:20:1000; |
||
| 8 | result=[]; |
||
| 9 | frequenciesSoFar=[]; |
||
| 10 | for f2=f1+frequencyDiffs |
||
| 11 | [frequencies fft_ampdB]=testDPOAE (leveldB, [f1 f2]); |
||
| 12 | dpFreq=2*f1-f2; |
||
| 13 | [a idx]=min((frequencies-dpFreq).^2); |
||
| 14 | result=[result fft_ampdB(idx)]; |
||
| 15 | frequenciesSoFar=[frequenciesSoFar dpFreq]; |
||
| 16 | figure(4), plot(frequenciesSoFar, result) |
||
| 17 | title(['F1= ' num2str(f1) ' F2= ' ... |
||
| 18 | num2str(f1+ [min(frequencyDiffs) max(frequencyDiffs)])... |
||
| 19 | ' leveldB= ' num2str(leveldB)]) |
||
| 20 | xlabel('DP (2f1- f2) frequency'), ylim([0 100])
|
||
| 21 | end |
||
| 22 | |||
| 23 | grid on |
||
| 24 | |||
| 25 | disp(result) |