-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFigS1.m
More file actions
62 lines (60 loc) · 2.78 KB
/
FigS1.m
File metadata and controls
62 lines (60 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
clc; clear all; close all;
% *************************************************************************
% Fig S1 shows the compression for the grid cell firing patterns of the
% static feautre system in configuration B compared to configuration A.
% In comparison to Fig 3, this figure shows the simulation results for the
% attractor model. To update the data run SimConfA.m and SimConfB.m.
%
% Copyright (C) 2015 Florian Raudies, 05/02/2015, Palo Alto, CA.
% License, GNU GPL, free software, without any warranty.
% *************************************************************************
ConfA = load('SimConfA'); % Load the simulation data.
ConfB = load('SimConfB');
LABEL_SIZE = 16; % Font size for the labels in points.
opt.scale = 2/3; % Scale factor for 100% compression.
figure('Position',[50 50 1200 900]);
subplot(2,3,1);
imagesc(ConfA.SpikeRateVelAtt); axis equal tight off;
title(sprintf('%s\n%s','Moving Feature System',...
sprintf('Configuration A, GS %2.2f',ConfA.gsVelAtt)),...
'FontSize',LABEL_SIZE);
subplot(2,3,2);
imagesc(ConfB.SpikeRateVelAtt); axis equal tight off;
title(sprintf('%s\n%s','Moving Feature System',...
sprintf('Configuration B, GS %2.2f',ConfB.gsVelAtt)),...
'FontSize',LABEL_SIZE);
subplot(2,3,3);
[CorrCoeff Stretch] = rescaleCorr(...
ConfA.SpikeRateVelAtt,ConfB.SpikeRateVelAtt,opt);
Stretch = Stretch*100;
[mv mi] = max(CorrCoeff);
plot(Stretch,CorrCoeff,'.k',[Stretch(mi) Stretch(mi)],[0 mv],'-r',...
'LineWidth',2.0);
xlabel('Rescaling (%)','FontSize',LABEL_SIZE);
ylabel('Correlation r2','FontSize',LABEL_SIZE);
axis square; axis([Stretch(1) Stretch(end) 0 1]);
set(gca,'FontSize',LABEL_SIZE);
title('Moving Feature System','FontSize',LABEL_SIZE);
subplot(2,3,4);
imagesc(ConfA.SpikeRateAngAtt); axis equal tight off;
title(sprintf('%s\n%s','Static Feature System',...
sprintf('Configuration A, GS %2.2f',ConfA.gsAngAtt)),...
'FontSize',LABEL_SIZE);
subplot(2,3,5);
imagesc(ConfB.SpikeRateAngAtt); axis equal tight off;
title(sprintf('%s\n%s','Static Feature System',...
sprintf('Configuration B, GS %2.2f',ConfB.gsAngAtt)),...
'FontSize',LABEL_SIZE);
subplot(2,3,6);
[CorrCoeff Stretch] = rescaleCorr(...
ConfA.SpikeRateAngAtt,ConfB.SpikeRateAngAtt,opt);
Stretch = Stretch*100;
[mv mi] = max(CorrCoeff);
plot(Stretch,CorrCoeff,'.k',[Stretch(mi) Stretch(mi)],[0 mv],'-r',...
'LineWidth',2.0);
xlabel('Rescaling (%)','FontSize',LABEL_SIZE);
ylabel('Correlation r2','FontSize',LABEL_SIZE);
axis square; axis([Stretch(1) Stretch(end) 0 1]);
set(gca,'FontSize',LABEL_SIZE);
title('Static Feature System','FontSize',LABEL_SIZE);
print('-depsc','FigS1');