0001 function [name_,name__] = dsGetNamespaces(spec)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 if isfield(spec,'specification')
0014 spec=spec.specification;
0015 end
0016
0017 name_={};
0018 name__={};
0019
0020
0021 for i=1:length(spec.populations)
0022 name_{end+1}=[spec.populations(i).name '_'];
0023 name__{end+1}=[spec.populations(i).name '_'];
0024 for j=1:length(spec.populations(i).mechanisms)
0025 name_{end+1}=[spec.populations(i).name '_' spec.populations(i).mechanisms(j).name '_'];
0026 name__{end+1}=[spec.populations(i).name '__' spec.populations(i).mechanisms(j).name '_'];
0027 end
0028 end
0029
0030
0031 for i=1:length(spec.connections)
0032 name_{end+1}=[spec.connections(i).target '_' spec.connections(i).source '_'];
0033 name__{end+1}=[spec.connections(i).target '__' spec.connections(i).source '_'];
0034 for j=1:length(spec.connections(i).mechanisms)
0035 name_{end+1}=[spec.connections(i).target '_' spec.connections(i).source '_' spec.connections(i).mechanisms(j).name '_'];
0036 name__{end+1}=[spec.connections(i).target '__' spec.connections(i).source '__' spec.connections(i).mechanisms(j).name '_'];
0037 end
0038 end