                               README
			       ------

-------------------------------------------------------------------------------
Math Library
Version 1.0  13-Nov-1995.
Copyright (c) 1995 by The MathWorks, Inc.
$Revision: 1.3 $  $Date: 1995/11/13 15:26:33 $
-------------------------------------------------------------------------------


The files in this directory fall into two categories:

   * Example source code written in C.
   * Files to build the source code into standalone external applications.

All the files appearing in this directory are detailed in the
"MATLAB C Math Library User's Guide."


                           Example Source Code
                           -------------------

Five C-Files
-----------

These examples require the MATLAB C Math Library.  Each example is 
contained in a single file:

	ex1.c : Creating and Printing Matrices
	ex2.c : Writing Simple Functions
	ex3.c : Calling Library Routines
	ex4.c : Error Handling
	ex5.c : Integrating a Function

See the documentation (The MATLAB C Math Library User's Guide) for
more detail on these examples.


                        Files to Build and Configure Examples
                        -------------------------------------

* Makefile, which is an example UNIX Makefile for building 
  external applications.  You need "gmake", GNU make, in order to
  build an external application from this Makefile.  
  Before building applications with this Makefile, you need to:

      1. Edit the Makefile and change the definition of MATLAB_ROOT
         to the full path to your MATLAB root directory.

      2. Make sure the environment variable ARCH is set to correctly
         reflect your platform.  The Makefile contains a list of all
	 the valid values of ARCH.

  Once you've done that, type 

	$ gmake exec

  to build and run all the examples.  The Makefile will probably not work
  on a Macintosh.  However, you should also find Macintosh project files
  here for each example; use them to build the examples instead.

* mbuild, which is a shell script that builds any collection
  C files calling MATLAB math routines into an external application.

  Before building applications with mbuild, you need to edit it and:

	1. Set the MATLABROOT variable to the full path to your 
	   MATLAB root directory.

	2. Make sure the system-dependent section cooresponding to
	   your platform is uncommented, and that all other system
  	   dependent sections are commented out. 

	3. Set the value of TARGET_APPLICATION, if you want it to be
	   different than a.out.

  Then you're ready to run mbuild.  For example, to build and run example 2, 
  you'd type:

	$ mbuild ex2
	$ a.out


