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 @ 38:c2204b18f4a2

History | View | Annotate | Download (1.2 KB)

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