getMetsInComp Gets the metabolites in a specified compartment model a model structure comp string with the compartment id I boolean vector of the metabolites metNames the names of the metabolites Usage: [I metNames]=getMetsInComp(model,comp) Rasmus Agren, 2013-08-01
0001 function [I metNames]=getMetsInComp(model,comp) 0002 % getMetsInComp 0003 % Gets the metabolites in a specified compartment 0004 % 0005 % model a model structure 0006 % comp string with the compartment id 0007 % 0008 % I boolean vector of the metabolites 0009 % metNames the names of the metabolites 0010 % 0011 % Usage: [I metNames]=getMetsInComp(model,comp) 0012 % 0013 % Rasmus Agren, 2013-08-01 0014 % 0015 0016 if ischar(comp) 0017 comp={comp}; 0018 end 0019 0020 J=find(ismember(upper(model.comps),upper(comp))); 0021 0022 if numel(J)~=1 0023 dispEM(['No unique match to compartment "' comp{1} '"']); 0024 end 0025 0026 I=model.metComps==J; 0027 metNames=model.metNames(I); 0028 end