Mercurial > hg > map
comparison Copy_of_multithreshold 1.46/testPhaseLocking.m @ 28:02aa9826efe0
mainly multiThreshold
author | Ray Meddis <rmeddis@essex.ac.uk> |
---|---|
date | Fri, 01 Jul 2011 12:59:47 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
27:d4a7675b0413 | 28:02aa9826efe0 |
---|---|
1 function testPhaseLocking | |
2 | |
3 testFrequencies=[250 500 1000 2000 4000 8000]; | |
4 levels=50:10:80; | |
5 figure(14), clf | |
6 set(gcf,'position', [980 36 383 321]) | |
7 set(gcf,'name', 'phase locking') | |
8 allStrengths=zeros(length(testFrequencies), length(levels)); | |
9 peakVectorStrength=zeros(1,length(testFrequencies)); | |
10 freqCount=0; | |
11 for targetFrequency=testFrequencies; | |
12 %single test | |
13 freqCount=freqCount+1; | |
14 vectorStrength=testAN(targetFrequency,targetFrequency, levels); | |
15 allStrengths(freqCount,:)=vectorStrength'; | |
16 peakVectorStrength(freqCount)=max(vectorStrength'); | |
17 end | |
18 %% plot results | |
19 figure(14) | |
20 subplot(2,1,2) | |
21 plot(levels,allStrengths) | |
22 xlabel('levels') | |
23 ylabel('vector strength') | |
24 legend (num2str(testFrequencies'),'location','eastOutside') | |
25 | |
26 subplot(2,1,1) | |
27 semilogx(testFrequencies,peakVectorStrength) | |
28 grid on | |
29 title ('peak vector strength') | |
30 xlabel('frequency') | |
31 ylabel('vector strength') | |
32 | |
33 johnson=[250 0.79 | |
34 500 0.82 | |
35 1000 0.8 | |
36 2000 0.7 | |
37 4000 0.25 | |
38 5500 0.05 | |
39 ]; | |
40 hold on | |
41 plot(johnson(:,1),johnson(:,2),'o') | |
42 legend({'model','Johnson 80'},'location','eastOutside') | |
43 hold off | |
44 | |
45 |