	 MATLAB application programming interface for libSBML

			    Sarah Keating

		Science and Technology Research Centre
		     University of Hertfordshire
			  Hatfield, AL10 9AB
			    United Kingdom

			    The SBML Team
			 http://www.sbml.org/
		     mailto:sbml-team@caltech.edu


    Date of last update to this file: $Date: 2009-01-04 11:26:05 +0900 (日, 04  1月 2009) $


---------------
1.  Quick Start
---------------

The libSBML MATLAB binding provides a MATLAB function called
TranslateSBML.  This function can be used to import an SBML model 
into the MATLAB environment as a MATLAB data structure.

The Windows distribution of libSBML includes a precompiled copy of
TranslateSBML.  The source distribution of libSBML for Linux, MacOS X
and other Unix-like environments does not come with precompiled
executables and you will need to build TranslateSBML as described
below.


----------------------------------
2.  Configuration and Installation
----------------------------------

Windows
-------

A precompiled version of the Windows .mexw32 file is available; you
should not need to follow these instructions in most circumstances.

Start a Windows command shell.

At the command prompt, change to the directory holding the file you
are reading right now, i.e., 'libsbml-VERSION\src\binding\matlab'
where "VERSION" is the version of libSBML you have obtained.

Execute "make.bat".  This will start MATLAB and run a script that 

  1) adds the directory to the MATLAB search path,

  2) checks whether the necessary libraries are on the PATH and if not
  copies the files to the matlabroot\bin\win32 directory as this must
  be on the PATH if MATLAB is installed,

The TranslateSBML executable is provided with the download and it is
not necessary to build it in order to use it.  However the script
BuildTranslate_Win32 can be used within MATLAB to build
TranslateSBML.dll provided the C compiler that MATLAB uses is
compatible.


Linux and MacOS X
-----------------

The first step is to run the top-level libSBML 'configure' script with
the --with-matlab option.  (See the top-level README.txt file in the
libSBML source distribution.)  You will probably have to supply the
pathname of the directory tree where MATLAB is installed on your
system.  For example, on MacOS X with release R14sp3 of MATLAB, run
the following shell command in the top-level libsbml directory:

    ./configure --with-matlab=/Applications/MATLAB704

The libSBML 'configure' script will construct a Makefile in this
directory (i.e., the directory containing the file you are reading
right now), and executing 'make' from the top level will run the
MATLAB mex compiler to create an object file for use with MATLAB.  The
'make install' step will then copy this object file to the library
installation directory chosen by the user.  (This directory is
/usr/local/lib by default.)

The second step is to configure MATLAB to look for the TranslateSBML
function in the libSBML library installation directory.  You can do
this by using a MATLAB command such as

    addpath('/usr/local/lib');

at the MATLAB prompt.  You may wish to add this command to your MATLAB
startup script in ${HOME}/matlab/startup.m.


------------------------------------------
3.  Licensing, Copyrights and Distribution
------------------------------------------

The terms of redistribution for this software are stated in the files
LICENSE.txt and COPYING.txt at the top level of the libSBML
distribution.





-----------------------------------------------------------------------------
File author: B. Bornstein, S. Keating, M. Hucka
Last Modified: $Date: 2009-01-04 11:26:05 +0900 (日, 04  1月 2009) $
Last Modified By: $Author: mhucka $
$HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/matlab/README.txt $
-----------------------------------------------------------------------------

# The following is for [X]Emacs users.  Please leave in place.
# Local Variables:
# fill-column: 70
# End:
