forked from opencobra/cobratoolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintConstraints.m
33 lines (30 loc) · 1018 Bytes
/
printConstraints.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function printConstraints(model,minInf, maxInf)
%printConstraints Print all network constraints that are not -Inf (minInf)
%or +Inf (maxInf)
%
% printConstraints(model,minInf, maxInf)
%
%INPUTS
% model COBRA model structure
% minInf value that is considered as -Inf (or desired minimum cutoff value)
% maxInf value that is considered as +Inf (or desired maximum cutoff value)
%
% Ines Thiele 02/09
minConstraints = intersect(find(model.lb>minInf),find(model.lb));
fprintf('MinConstraitns:');
fprintf('\n');
for i = 1:length(minConstraints)
fprintf('%s',model.rxns{minConstraints(i)});
fprintf('\t');
fprintf('%e',model.lb(minConstraints(i)));
fprintf('\n');
end
maxConstraints =intersect(find(model.ub<maxInf),find(model.ub));
fprintf('maxConstraints:');
fprintf('\n');
for i = 1:length(maxConstraints)
fprintf('%s',model.rxns{maxConstraints(i)});
fprintf('\t');
fprintf('%e',model.ub(maxConstraints(i)));
fprintf('\n');
end