Home > tutorial > tutorial2_solutions.m

tutorial2_solutions

PURPOSE ^

tutorial2_solutions

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 tutorial2_solutions
   This script contains the solutions for Tutorial 2, see Tutorial 2 in
   "RAVEN tutorials.docx" for more details.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % tutorial2_solutions
0002 %   This script contains the solutions for Tutorial 2, see Tutorial 2 in
0003 %   "RAVEN tutorials.docx" for more details.
0004 
0005 %Import the Excel model into a RAVEN model structure
0006 smallModel=importExcelModel('small.xlsx');
0007 
0008 %This solves the linear programming problem.
0009 %NOTE: if sol.f is equal to zero then the problem is not solvable. Ensure
0010 %that uptake and excretion of all necessary stuff are added to the model
0011 %and run the solveLP again.
0012 sol=solveLP(smallModel);
0013 
0014 %Print the resulting exchange fluxes
0015 printFluxes(smallModel,sol.x,true);
0016 
0017 %Print all fluxes
0018 printFluxes(smallModel,sol.x,false,10^-5,[],'%rxnID (%rxnName):\n\t%eqn\n\t%flux\n');

Generated by m2html © 2005