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