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.

Statistics Download as Zip
| Branch: | Revision:

root / multithreshold 1.46 / testPhaseLocking.m @ 24:a5e4a43c1673

History | View | Annotate | Download (1.04 KB)

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