FMINUIT  -  A binding to MINUIT for Matlab, Octave & Scilab.
=======

version 2.3.1 	May-2010

The Fminuit program is Copyright (C) 1996-2010 Giuseppe Allodi 
<Giuseppe.Allodi@fis.unipr.it> 
WWW:  http://www.fis.unipr.it/~giuseppe.allodi/Fminuit/  

The underlying MINUIT package was written by F. James at CERN, Geneva 
(Switzerland). Copyright (C) is owned by CERN. 


What is Fminuit?
----------------

Fminuit is an optimization and chi-square fitting program for Matlab, Octave 
and Scilab, based on the MINUIT minimization engine. 
Minuit is a library of Fortran 77 subroutines developed at CERN, well known
among the physics community and often considered as the state of the art when 
it comes to fit experimental data. 
I am not going to challenge this belief here. Based on my experience with it, 
I can however say that
- Minuit is very robust (possibly) bug-free code, having been developed and 
  tested by a number of physicists over more than twenty years;  
- it is efficient code implementing efficient algorithms; 
- it provides valuable features often unavailable from concurrent programs, 
  such as choice among several minimization algorithms, constrained minima, 
  and step-by-step control of the minimization process.

Fminuit runs under Matlab, as well as its clones (Octave, Scilab), as a 
dynamic executable, i.e. it is invoked as a Matlab/Scilab function, with a 
calling sequence similar (although not identical) to that of former Matlab's 
fmins (whence the name).
It minimizes any Matlab's (or clone)'s function, either implemented as a 
.m(.sci) script file or as a compiled .dll, provided that it returns a real 
scalar and it depends on one or two input arguments.
The first function argument is a vector of variational parameters, while the 
second argument can be any data type and contains constant data. In the case 
of chi-square fitting, the latter usually consists of a 3-column or 3-row 
matrix of experimental data: the independent variable, measured values of the 
dependent variable, and error bars.
Fminuit is intended to constitute a reasonable compromise between the power 
and speed of Minuit on one hand, and the usage simplicity and the graphic 
capabilities of Matlab on the other. In particular, all what a user needs is 
writing the chi-square function, often only a few line of Matlab code.
As compared to the direct call of the Minuit APIs from a Fortran main program, 
the execution speed in most cases turns out to be largely acceptable even on 
a slow computer. In the case of a chi-square function compiled as a DLL, the 
efficiency can be very close to that of Fortran calls. 


History
-------------

Fminuit was originally developed for Matlab 4.x under Vax-Alpha/VMS in the 
90s, and later ported a number of operating systems. Over the years, fminuit 
has been successfully compiled for VMS, Solaris, IRIX, Digital Unix, 
Windows (by means of f2c), and Linux. Support for Octave and Scilab was also 
introduced in recent years.


Compatibility
-------------

Fminuit is compatible with all later versions of Matlab (currently, 7.x), 
as well as with Matlab clones under Linux (Octave version 2.x-3.x, Scilab 
version 2.5-5.x).
Fminuit for Matlab can be compiled on any platform where a Unix-compliant 
Fortran compiler, linker-compatible with a C compiler supported by Matlab is 
running. The f2c Fortran-to-C translator belongs to this class and its runtime 
library can be built for any platform and C compiler. Therefore, at least 
with f2c, Fminuit for Matlab can be compiled for virtually any operating 
system and hardware architecture. 


Getting Fminuit
-------------

Download  Fminuit from this site, either as precompiled DLL (Matlab for Linux 
and 32-bit Windows only) or as source code tarball. If you need compiling 
Fminuit from sources, read also Building and Porting.


Running Fminuit
---------------

Apart from the online help, see the file Fminuit.m (Fminuit.cat) for a 
detailed description of the usage of Fminuit and its options. 
Some examples are also available in the ./examples directory.


Acknowledgment
---------------

To all the people (mainly from the Physics Department of Parma) who have used 
Fminuit over these years and found it useful, thus encouraging me to keep this 
software maintained.

