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 / testPrograms / testPhaseLocking.m @ 29:b51bf546ca3f

History | View | Annotate | Download (1.15 KB)

1 29:b51bf546ca3f rmeddis
function testPhaseLocking(paramsName, paramChanges)
2
3
if nargin<2
4
    paramChanges=[];
5
end
6
7
testFrequencies=[250 500 1000 2000 4000 8000];
8
levels=50:10:80;
9
figure(14), clf
10
set(gcf,'position', [980    36   383   321])
11
set(gcf,'name', 'phase locking')
12
allStrengths=zeros(length(testFrequencies), length(levels));
13
peakVectorStrength=zeros(1,length(testFrequencies));
14
freqCount=0;
15
for targetFrequency=testFrequencies;
16
    %single test
17
    freqCount=freqCount+1;
18
    vectorStrength=...
19
        testAN(targetFrequency,targetFrequency, levels,...
20
        paramsName, paramChanges);
21
    allStrengths(freqCount,:)=vectorStrength';
22
    peakVectorStrength(freqCount)=max(vectorStrength');
23
end
24
%% plot results
25
figure(14)
26
subplot(2,1,2)
27
plot(levels,allStrengths)
28
xlabel('levels')
29
ylabel('vector strength')
30
legend (num2str(testFrequencies'),'location','eastOutside')
31
32
subplot(2,1,1)
33
semilogx(testFrequencies,peakVectorStrength)
34
grid on
35
title ('peak vector strength')
36
xlabel('frequency')
37
ylabel('vector strength')
38
39
johnson=[250	0.79
40
500	0.82
41
1000	0.8
42
2000	0.7
43
4000	0.25
44
5500	0.05
45
];
46
hold on
47
plot(johnson(:,1),johnson(:,2),'o')
48
legend({'model','Johnson 80'},'location','eastOutside')
49
hold off
50