[g, geq] = cba_flux2model_constraint(E_vector,N,ind_ext,zv,epsilon)
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 = [];