About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 6 years ago
  • Total downloads: 136
  • Price: Free |
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Fred Sigworth (3 other programs)
See full specifications

scripts default iconState-machine simplex minimizer (Scripts) Publisher's description

This is a single M-file that implements a Nelder-Mead simplex minimizer

This is a single M-file that implements a Nelder-Mead simplex minimizer. It makes use of MATLAB's persistent variables to create a "state machine" implementation. This allows entire minimization programs to be written as MATLAB scripts, as it does not require a function to be defined and passed to the minimization routine. In my opinion, this makes the fitting of functions to data much more fun and educational!

The traditional approach to optimization is to pass a function to an optimizer, which then takes control of the program until it is done. For example, the function 'fun' is minimized by a call to
x = fminsearch(fun,x0,options).
The disadvantage of this approach is that 'fun' must be defined in an M-file, and inserting code to observe the progress of the minimization is made difficult by the different scopes of the calling program and 'fun'.

Simplex.m does not take control of the program, but instead provides a new vector of parameters to "try" with each iteration. Here is a simple example, that minimizes the sixth power of the difference between two vectors:

% Example of use: minimize (p-q).^6

p=[2 2 1.5 2]'; % inital guess
q=[1 1 1 1]'; % true values


for i=1:200
y=sum((p-q).^6); % Evaluation of the function
p=Simplex(y); % Simplex provides a new vector p

if ~mod(i, 10) % every 10 iterations print out the fitted value


p=Simplex('centroid'); % get the final best value.

The first call to Simplex is an initialization, where the starting guess of the parameter vector is supplied. The function sum(p-q).^6 is evaluated in-line, and its result is given to Simplex; in turn, a new parameter vector p is returned. The progress of the minimization is easily monitored because the function evaluation remains in the scope of the main program.

System Requirements:

MATLAB 6.5 (R13)
Program Release Status: New Release
Program Install Support: Install and Uninstall

State-machine simplex minimizer (Scripts) Tags:

Click on a tag to find related softwares

Is State-machine simplex minimizer (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.