-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpspm_rev_con.m
51 lines (47 loc) · 1.21 KB
/
pspm_rev_con.m
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
function varargout = pspm_rev_con(model)
% ● Description
% pspm_rev_con is a tool for reviewing contrasts of first level models
% ● Format
% fighandle = pspm_rev_con(modelfile)
% ● Arguments
% modelfile: filename and path of modelfile
% ● History
% Introduced in PsPM 3.0
% Written in 2008-2015 by Dominik R Bach (UZH, WTCN)
%% Initialise
global settings
if isempty(settings)
pspm_init;
end
sts = -1;
fighandle = [];
switch nargout
case 1
varargout{1} = fighandle;
case 2
varargout{1} = sts;
varargout{2} = fighandle;
end
% check input
% ------------------------------------------------------------------------
if nargin < 1, return;
elseif ~isfield(model, 'con')
fprintf('No contrasts contained in model.\n');
return;
end;
% print contrast names to screen
% ------------------------------------------------------------------------
fprintf('Contrast names for %s:\n---------------------------------------\n', model.modelfile);
for n=1:numel(model.con)
fprintf('Contrast %d: %s\n',n,model.con(n).name);
end;
fprintf('---------------------------------------\n');
sts = 1;
switch nargout
case 1
varargout{1} = fighandle;
case 2
varargout{1} = sts;
varargout{2} = fighandle;
end
return