forked from TASBE/TASBEFlowAnalytics
-
Notifications
You must be signed in to change notification settings - Fork 1
/
select_channels.m
26 lines (23 loc) · 954 Bytes
/
select_channels.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
% Copyright (C) 2010-2017, Raytheon BBN Technologies and contributors listed
% in the AUTHORS file in TASBE analytics package distribution's top directory.
%
% This file is part of the TASBE analytics package, and is distributed
% under the terms of the GNU General Public License, with a linking
% exception, as described in the file LICENSE in the TASBE analytics
% package distribution's top directory.
function [selected selected_par] = select_channels(channels,rawfcs,fcshdr)
selected = zeros(size(rawfcs,1),numel(channels));
selected_par = cell(numel(channels),1);
for i=1:numel(channels)
found = false;
for j=1:numel(fcshdr.par)
name=getName(channels{i});
if(strcmp(name,fcshdr.par(j).name))
selected(:,i)=rawfcs(:,j);
selected_par{i}=fcshdr.par(j);
found=true; continue;
end
end
if(~found), error('Could not find channel %s',getPrintName(channels{i})); end;
end
end