Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
with installation package update
  • Loading branch information
Junpeng Lao committed Oct 13, 2016
1 parent 4dc3895 commit dfca5ff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
Binary file modified Matlab_Installation_Package/iMap4.mlappinstall
Binary file not shown.
36 changes: 21 additions & 15 deletions imap_utilities/rdmfixmap.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
function [RDM, stRDM] = rdmfixmap(FixMap, Mask, CondiVec, SbjVec)
function [RDM, stRDM] = rdmfixmap(FixMap, Mask, CondiVec, SbjVec, varargin)
% compute representational dissimilarity matrix of smoothed fixation map
% basic on Mahalanobis distance.

if nargin > 4
plotopt = varargin{1};
else
plotopt = 1;
end
CondiVec = categorical(CondiVec);
SbjVec = categorical(SbjVec);
% normalized map
Expand Down Expand Up @@ -80,18 +84,20 @@
end
end
% RDM = RDM./max(RDM(:));
% display output
scrsz=get(0,'ScreenSize');% get screen size for output display
figure('Numbertitle','off','Name',...
'Representational Dissimilarity Matrix (value shows multivariate distance)',...
'Position',[1 1 scrsz(3) scrsz(4)]);
subplot(1,2,1)
imagesc(stRDM);
title('stRDM')
axis square off;
subplot(1,2,2)
imsqrmat(RDM, unicd);
title('RDM')
if plotopt
% display output
scrsz=get(0,'ScreenSize');% get screen size for output display
figure('Numbertitle','off','Name',...
'Representational Dissimilarity Matrix (value shows multivariate distance)',...
'Position',[1 1 scrsz(3) scrsz(4)]);
subplot(1,2,1)
imagesc(stRDM);
title('stRDM')
axis square off;
subplot(1,2,2)
imsqrmat(RDM, unicd);
title('RDM')
end
end

%---------------------------------------------
Expand Down Expand Up @@ -147,4 +153,4 @@
y = pab(I).*log2(pab(I)./papb(I));

I = sum(y);
end
end

0 comments on commit dfca5ff

Please sign in to comment.