-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselantl.m
38 lines (34 loc) · 1010 Bytes
/
selantl.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
% Extraction type anntyp and number num annotations from anot annotator
% function [anot]=selan(anot,type,number,t)
%
% Jose Garcia Moros
% email: [email protected]
% last revision: 20 Oct 1997
function [anot]=selan(anot,type,number,t)
no_leads=size(anot,2);
for l=1:no_leads
if type=='t', auxi=find(~(anot(l).anntyp==type));
else auxi=find(~(anot(l).anntyp==type & anot(l).num==number)); %%especificamente no quiere hacer lo que haga selantl a los que tengan type N y num 0 que son todos mi caso
end
if (~isempty(auxi))
anot(l).anntyp(auxi)=[];
anot(l).time(auxi)=[];
anot(l).num(auxi)=[];
anot(l).subtyp(auxi)=[];
anot(l).chan(auxi)=[];
%anot(l).aux(auxi,:)=[];
end
end
if nargin==4
for l=1:no_leads
auxi=find(anot(l).time<t(1) | anot(l).time>t(2));
if (~isempty(auxi))
anot(l).anntyp(auxi)=[];
anot(l).time(auxi)=[];
anot(l).num(auxi)=[];
anot(l).subtyp(auxi)=[];
anot(l).chan(auxi)=[];
%anot(l).aux(auxi,:)=[];
end
end
end