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

cba_efm_remove_nonelementary

PURPOSE ^

M = efm_remove_nonelementary(M,E)

SYNOPSIS ^

function M = efm_remove_nonelementary(M,E)

DESCRIPTION ^

 M = efm_remove_nonelementary(M,E)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function M = efm_remove_nonelementary(M,E)
0002 
0003 % M = efm_remove_nonelementary(M,E)
0004 
0005 if length(M) * length(E),
0006   nonelementary = zeros(1,size(M,2));
0007   for it = 1:size(E,2),
0008     nonelementary = nonelementary + prod(M(find(E(:,it)),:),1);
0009   end
0010   M = M(:,nonelementary==0);
0011 end

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