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