|
FMINUIT
- A binding to Minuit
for
Matlab, Octave & Scilab
Version
2.3.1 May 2010
The
Fminuit program is copyright © 1996-2010 by Giuseppe Allodi (Giuseppe.Allodi@fis.unipr.it).
The
underlying MINUIT
package
was written by F. James at CERN, Geneva (Switzerland). The copyright ©
is owned by CERN.
Fminuit is free software; you can redistribute it and/or
modify
it under the terms of the GNU General Public License. It is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY.
This
document is part of the Fminuit
distribution and is subject to the same license conditions.
TABLE
OF CONTENTS
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
and implements 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.
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.
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.
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.
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.
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.
Special thanks to Toni
Shiroka for the design of these web pages.
Giuseppe.Allodi@fis.unipr.it
©
Copyright by G. Allodi 1996 - 2010.
|