-
Notifications
You must be signed in to change notification settings - Fork 5
/
cat_debug.m
40 lines (34 loc) · 1.22 KB
/
cat_debug.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
function cat_debug
%cat_debug print debug information for SPM12 and CAT12
%
% FORMAT cat_debug
%
% ______________________________________________________________________
%
% Christian Gaser, Robert Dahnke
% Structural Brain Mapping Group (https://neuro-jena.github.io)
% Departments of Neurology and Psychiatry
% Jena University Hospital
% ______________________________________________________________________
% $Id$
rev = '$Rev$';
% print last error
fprintf('\nLast error message:\n');
fprintf('-------------------------------------------------------------------------------------\n');
fprintf('-------------------------------------------------------------------------------------\n');
try
er = lasterror;
fprintf('%s\n',er.message);
if isfield(er,'stack')
for i=1:length(er.stack)
fprintf('%s at line %g\n',char(er.stack(i).file),er.stack(i).line);
end
end
catch
fprintf('%s\n',lasterr);
end
fprintf('-------------------------------------------------------------------------------------\n');
fprintf('-------------------------------------------------------------------------------------\n');
fprintf('\nVersion information:\n');
fprintf('-------------------------------------------------------------------------------------\n');
ver