File size: 603 Bytes
0b58803 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function s = struct(this)
% Struct method for GIfTI objects
% FORMAT s = struct(this)
% this - GIfTI object
% s - a structure containing public fields of the object
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
% Guillaume Flandin
% $Id: struct.m 6507 2015-07-24 16:48:02Z guillaume $
names = fieldnames(this);
values = cell(length(names), length(this(:)));
for i=1:length(names)
[values{i,:}] = subsref(this(:), substruct('.',names{i}));
end
s = reshape(cell2struct(values,names,1),size(this));
|