Access to function and Jacobian values

Once an odefile is created, it can be used to compute the values of the odefunction and its derivatives with respect to state variables and parameters on the command line. As an example, consider the Morris-Lecar system MyML in the directory Testruns/TestSystems. This system has two state variables and two parameters. We compute the odefunction values and derivatives with respect to the state vaariables and parameters for the state vector $[0;0]$ and parameters (30,10) by executing the script testodefile, available in the directory Testruns:

MyMLSystem=MyML
MyMLfunction=MyMLSystem{2}
MyMLjacobian=MyMLSystem{3}
MyMLjacobianp=MyMLSystem{4}
MyMLfunction(0,[0;0],30,10)
MyMLjacobian(0,[0;0],30,10)
MyMLjacobianp(0,[0;0],30,10)

The output is as follows:

MyMLSystem =

   1 x 9 cell array 
	
	{@init} {@fun_eval}  {@jacobian} {@jacobianp} {@hessians}
	{@hessiansp} {0x0 double} {0x0 double} {0x0 double}
	
MyMLfunction =

  function_handle with value:

    @fun_eval


MyMLjacobian =

  function_handle with value:

    @jacobian


MyMLjacobianp =

  function_handle with value:

    @jacobianp


ans =

   33.1953
    0.0167


ans =

    1.8282 -128.0000
    0.0013   -0.0694


ans =

    0.2000         0
         0   -0.0013