Mercurial > hg > map
view utilities/UTIL_paramsList.m @ 38:c2204b18f4a2 tip
End nov big change
author | Ray Meddis <rmeddis@essex.ac.uk> |
---|---|
date | Mon, 28 Nov 2011 13:34:28 +0000 |
parents | f233164f4c86 |
children |
line wrap: on
line source
function paramsFound=UTIL_paramsList(myWhos) % UTIL_paramsList looks for structures with names ending in Params. % nm=UTIL_paramsList(whos); % for i=1:length(nm), eval(['showStruct(' nm{i} ', ''' nm{i} ''')']),end % find structures ending with params paramsUsedCount=0; for i=1:length(myWhos) var=myWhos(i).name; if length(var)>5 tag=var(end-5:end); if strcmp(tag,'Params') paramsUsedCount=paramsUsedCount+1; paramsUsed{paramsUsedCount}=var; end end end orderedList={'controlParams', 'globalStimParams', 'inputStimulusParams',... 'OMEParams', 'DRNLParams', ... 'IHC_cilia_RPParams', 'IHCpreSynapseParams', 'AN_IHCsynapseParams', ... 'MacGregorMultiParams', 'MacGregorParams'}; % check that they belong to the approved list paramsFoundcount=0; for i=1:length(orderedList) for j=1:length(paramsUsed) usedName=paramsUsed{j}; if strcmp(orderedList{i},paramsUsed{j}) paramsFoundcount=paramsFoundcount+1; paramsFound{paramsFoundcount}=usedName; end end end % return the list of names