[422372]: / functions / @eegobj / length.m

Download this file

15 lines (13 with data), 379 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
function res = length(this);
tmp = struct(this);
%if any(cellfun(@length, { tmp.EEG }) > 1)
% error('EEG structure in object with more than 1 element')
%end
try
res = length(tmp.EEG);
catch
res = length(tmp);
return;
end
if res > 1, error('EEG structure in object with more than 1 element'); end
res = length(tmp);