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 / tempPL.m @ 38:c2204b18f4a2

History | View | Annotate | Download (1.18 KB)

1 38:c2204b18f4a2 rmeddis
function testPhaseLocking(paramsName, paramChanges)
2
3
if nargin<2
4
    paramChanges=[];
5
end
6
7
if nargin<1
8
    paramsName='PL';
9
end
10
11
testFrequencies=[250 500 1000 2000];
12
levels=0:10:100;
13
14
figure(14), clf
15
set(gcf,'position', [980    36   383   321])
16
set(gcf,'name', 'phase locking')
17
18
allStrengths=zeros(length(testFrequencies), length(levels));
19
peakVectorStrength=zeros(1,length(testFrequencies));
20
21
freqCount=0;
22
for targetFrequency=testFrequencies;
23
    %single test
24
    freqCount=freqCount+1;
25
    vectorStrength=...
26
        temp(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
plot(levels,allStrengths, '+')
35
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