VFGEN
  • Home
  • Download
  • Support & FAQ
  • User's Guide
  • §   Vector Field File
  • §   ADOL-C
  • §   AUTO
  • §   Check
  • §   CVODE
  • §   DDE23
  • §   DDE-BIFTOOL
  • §   DDE_SOLVER
  • §   Delay2ODE
  • §   DSTool
  • §   EVF
  • §   GSL
  • §   Help
  • §   LaTeX
  • §   MATCONT
  • §   MATLAB
  • §   Octave
  • §   PyDSTool
  • §   PyGSL
  • §   RADAU5
  • §   Scilab
  • §   SciPy
  • §   Taylor
  • §   XPP

MATCONT

MATCONT and CL_MATCONT are MATLAB programs for doing numerical continuation. From the MATCONT web page: "The aim of MATCONT and CL_MATCONT is to provide a continuation toolbox which is compatible with the standard MATLAB ODE representation of differential equations."

The VFGEN MATCONT Command

A MATCONT file is created by the command

$ vfgen matcont vector_field_file.vf

One file is created, called [name].m, where [name] is the name given in the vector field file. The first function in the this file has the same name as the vector field. The return value of this function, out, will be:

Return Value MATCONT Meaning
out{1} = @[name]_init; Initialization function
out{2} = @[name]_vf; Vector field function
out{3} = @[name]_jac; Jacobian, with respect to the state variables
out{4} = @[name]_jacp; Jacobian, with respect to the parameters
out{5} = @[name]_hess; Hessians, with respect to the state variables
out{6} = @[name]_hessp; Second derivatives, taken with respect to the state variables and the parameters
out{7} = @[name]_der3; Third derivatives, taken with respect to the state variables
out{8} = []; Fourth derivatives; not created by VFGEN
out{9} = []; Fifth derivatives; not created by VFGEN
out{10} = @[name]_[user1];
out{11} = @[name]_[user2];
etc.
If any user functions are defined, they will also be implemented in the output file, and references to the function will be stored in out{10}, out{11}, etc.

Note

I have only tested the files create by VFGEN with CL_MATCONT. The demonstration scripts below are to be used with CL_MATCONT.

Example 1

Section 7.4 of the MATCONT manual "MATCONT and CL MATCONT: Continuation Toolboxes in Matlab" (A. Dhooge, et al, December 2006) discusses the Bratu example. A vector field file that defines the differential equations for this example is bratu.vf. A MATLAB definition file for MATCONT is created with the command

$ vfgen matcont bratu.vf
This creates the file bratu.m.

The MATLAB script bratu_script.m contains the commands given in Section 7.4 of the manual. Here is the plot generated by this script:

Example 2

We will use MATCONT to do two parameter continuation of limit points and Hopf points in the Morris-Lecar equations. A vector field file for these equations is MorrisLecar.vf.
The file created by

$ vfgen matcont:parstyle=list MorrisLecar.vf

is MorrisLecar.m.

The MATLAB script MorrisLecar_script.m first computes a curve of equilibrium by varying the parameter ic. Two limit points and a Hopf point are found on this curve. The script then does two parameter continuation (using ic and gca) of a limit point and of the Hopf point. Here is the plot generated by the script:

(The extraneous red dots are the starting points of the curves; each was computed in stages, forward and backward. The BT point is labeled twice because it was detected on both the Hopf curve and the limit point curve.)

Copyright © 2005-2007 Warren Weckesser