Home > metabolic-economics > metabolic-economics-utils > cba_flux2model_constraint.m

cba_flux2model_constraint

PURPOSE ^

[g, geq] = cba_flux2model_constraint(E_vector,N,ind_ext,zv,epsilon)

SYNOPSIS ^

function [g, geq] = cba_flux2model_constraint(E_vector,N,ind_ext,zv,epsilon)

DESCRIPTION ^

 [g, geq] = cba_flux2model_constraint(E_vector,N,ind_ext,zv,epsilon)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [g, geq] = cba_flux2model_constraint(E_vector,N,ind_ext,zv,epsilon)
0002 
0003 % [g, geq] = cba_flux2model_constraint(E_vector,N,ind_ext,zv,epsilon)
0004 
0005 nr   = length(zv);
0006 E    = -N';
0007 E(find(E)) = E_vector;
0008 
0009 ind_int = setdiff(1:nr,ind_ext);
0010 N_int = N(ind_int,:);
0011 E_int = E(:,ind_int);
0012 CJ    = eye(nr) - E_int * inv(N_int*E_int) * N_int;
0013 
0014 g     = - CJ' * zv + epsilon;
0015 geq   = [];

Generated on Fri 12-Feb-2016 20:18:22 by m2html © 2003