getConstantsList : gets all constants files from the settings directory. OUTPUT : possibleConstants.names : names of the constants files possibleConstants.resFlags : res flags with string to load constants from loadConstants resFlagList : list of all res flags. Copyright (C) 2016 Wiggins Lab Written by Stella Styliandou. 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 [possibleConstants, resFlagList, filepath] = getConstantsList() 0002 % getConstantsList : gets all constants files from the settings directory. 0003 % 0004 % OUTPUT : 0005 % possibleConstants.names : names of the constants files 0006 % possibleConstants.resFlags : res flags with string to load constants from loadConstants 0007 % resFlagList : list of all res flags. 0008 % 0009 % Copyright (C) 2016 Wiggins Lab 0010 % Written by Stella Styliandou. 0011 % University of Washington, 2016 0012 % This file is part of SuperSegger. 0013 % 0014 % SuperSegger is free software: you can redistribute it and/or modify 0015 % it under the terms of the GNU General Public License as published by 0016 % the Free Software Foundation, either version 3 of the License, or 0017 % (at your option) any later version. 0018 % 0019 % SuperSegger is distributed in the hope that it will be useful, 0020 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0021 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0022 % GNU General Public License for more details. 0023 % 0024 % You should have received a copy of the GNU General Public License 0025 % along with SuperSegger. If not, see <http://www.gnu.org/licenses/>. 0026 0027 0028 FulllocationOfFile = mfilename('fullpath'); 0029 fileSepPosition = find(FulllocationOfFile==filesep,1,'last'); 0030 filepath = FulllocationOfFile ( 1 :fileSepPosition-1); 0031 filepath = [filepath,filesep]; 0032 possibleConstants = dir([filepath,'*.mat']); 0033 0034 resFlagList = {}; 0035 0036 for i = 1 : numel (possibleConstants) 0037 cName = possibleConstants (i).name; 0038 possibleConstants(i).resFlag =cName (1:end-4); 0039 resFlagList{i} = possibleConstants(i).resFlag; 0040 end 0041 0042 end 0043