To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at git://github.com/rmeddis/MAP.git .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Revision:

root / utilities / UTIL_paramsList.m @ 38:c2204b18f4a2

History | View | Annotate | Download (1.09 KB)

1
function paramsFound=UTIL_paramsList(myWhos)
2
% UTIL_paramsList looks for structures with names ending in Params.
3
% nm=UTIL_paramsList(whos);
4
% for i=1:length(nm), eval(['showStruct(' nm{i} ', ''' nm{i} ''')']),end
5

    
6
% find structures ending with params
7
paramsUsedCount=0;
8
for i=1:length(myWhos)
9
    var=myWhos(i).name;
10
    if length(var)>5
11
        tag=var(end-5:end);
12
        if strcmp(tag,'Params')
13
            paramsUsedCount=paramsUsedCount+1;
14
            paramsUsed{paramsUsedCount}=var;
15
        end
16
    end
17
end
18

    
19

    
20

    
21
orderedList={'controlParams', 'globalStimParams', 'inputStimulusParams',...
22
     'OMEParams', 'DRNLParams', ...
23
    'IHC_cilia_RPParams', 'IHCpreSynapseParams', 'AN_IHCsynapseParams', ...
24
    'MacGregorMultiParams', 'MacGregorParams'};
25

    
26

    
27
% check that they belong to the approved list
28
paramsFoundcount=0;
29
for i=1:length(orderedList)
30
    for j=1:length(paramsUsed)
31
        usedName=paramsUsed{j};
32
        if strcmp(orderedList{i},paramsUsed{j})
33
            paramsFoundcount=paramsFoundcount+1;
34
            paramsFound{paramsFoundcount}=usedName;
35
        end
36
    end
37
end
38

    
39
% return the list of names
40