convertIrrevFluxDistribution

PURPOSE ^

convertInrrevFluxDistribution Convert irreversible flux distribution to

SYNOPSIS ^

function vRev = convertIrrevFluxDistribution(vIrrev,matchRev)

DESCRIPTION ^

convertInrrevFluxDistribution  Convert irreversible flux distribution to
reversible

 vRev = covertIrrevFluxDistribution(vIrrev,matchRev)

INPUTS
 vIrrev        Irreversible flux distribution
 matchRev      Vector mapping irreversible fluxes to reversible fluxes 
               (Generated by convertToIrreversible)

OUTPUT
 vRev          Reversible flux distribution

 Markus Herrgard 1/30/07

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vRev = convertIrrevFluxDistribution(vIrrev,matchRev)
0002 %convertInrrevFluxDistribution  Convert irreversible flux distribution to
0003 %reversible
0004 %
0005 % vRev = covertIrrevFluxDistribution(vIrrev,matchRev)
0006 %
0007 %INPUTS
0008 % vIrrev        Irreversible flux distribution
0009 % matchRev      Vector mapping irreversible fluxes to reversible fluxes
0010 %               (Generated by convertToIrreversible)
0011 %
0012 %OUTPUT
0013 % vRev          Reversible flux distribution
0014 %
0015 % Markus Herrgard 1/30/07
0016 
0017 processedFlux = false*ones(length(vIrrev),1);
0018 
0019 vRev = [];
0020 
0021 for i = 1:length(vIrrev)
0022     if (~processedFlux(i))
0023         if (matchRev(i) > 0)
0024             vRev(end+1) = vIrrev(i)-vIrrev(matchRev(i));
0025             processedFlux(matchRev(i)) = true;
0026         else
0027             vRev(end+1) = vIrrev(i);
0028         end
0029         processedFlux(i) = true;
0030     end
0031 end
0032 
0033 vRev = columnVector(vRev);

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003