


gateStrip : removes the gate field from clist, or the gate for index ind.
INPUT :
clist : table of cells with time-independent variables
ind : index to be removed from gate, if none given strips the whole gate
OUTPUT :
clist : updated clist with stripped gate
Copyright (C) 2016 Wiggins Lab
Written by Stella Stylianidou & Paul Wiggins.
University of Washington, 2016
This file is part of SuperSegger.
SuperSegger is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
SuperSegger is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SuperSegger. If not, see <http://www.gnu.org/licenses/>.

0001 function [clist] = gateStrip( clist, ind ) 0002 % gateStrip : removes the gate field from clist, or the gate for index ind. 0003 % 0004 % INPUT : 0005 % clist : table of cells with time-independent variables 0006 % ind : index to be removed from gate, if none given strips the whole gate 0007 % 0008 % OUTPUT : 0009 % clist : updated clist with stripped gate 0010 % 0011 % 0012 % Copyright (C) 2016 Wiggins Lab 0013 % Written by Stella Stylianidou & Paul Wiggins. 0014 % University of Washington, 2016 0015 % This file is part of SuperSegger. 0016 % 0017 % SuperSegger is free software: you can redistribute it and/or modify 0018 % it under the terms of the GNU General Public License as published by 0019 % the Free Software Foundation, either version 3 of the License, or 0020 % (at your option) any later version. 0021 % 0022 % SuperSegger is distributed in the hope that it will be useful, 0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0025 % GNU General Public License for more details. 0026 % 0027 % You should have received a copy of the GNU General Public License 0028 % along with SuperSegger. If not, see <http://www.gnu.org/licenses/>. 0029 0030 if ~exist('ind','var') || isempty(ind) || isempty(clist.gate) 0031 clist.gate = []; 0032 else 0033 loc = find( cellfun(@(x)isequal(x,ind),{clist.gate.ind}) ); 0034 if isempty (loc) 0035 % disp (['index : ', num2str(ind), ' not found in the gate']); 0036 else 0037 % disp (['removing : ', num2str(ind), ' from gate']); 0038 clist.gate(loc) = []; 0039 end 0040 end 0041 end