Owning Class: ode
Requires: MathScript RT Module
odepset
odepset(name1, value1, ..., nameN, valueN)
a = odepset
b = odepset(name1, value1, ..., nameN, valueN)
Legacy Name: odeset
Gets or sets the parameters LabVIEW uses to configure an ODE solver. odepset returns all parameters and their default values. odepset(name1, value1, ..., nameN, valueN) sets the parameters to the values you specify.
| Name | Description |
|---|---|
| name | Specifies the name of the parameter you want to set. name is a string. |
| value | Specifies the value of the parameter you want to set. |
| Name | Description |
|---|---|
| a | Returns the names and default values of the parameters. a is a string. |
| b | Returns the names and current values of the parameters. b is a string. |
When you use this function to set parameters, the settings you configure apply to all MathScript ODE solver functions in the ode class until you overwrite the parameters or until you close LabVIEW.
This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.
% The lorenz function is defined by:
% function dy = lorenz(times, y)
% dy = zeros(3, 1);
% dy(1) = 10*(y(2)-y(1));
% dy(2) = 28*y(1)-y(2)-y(1)*y(3);
% dy(3) = y(1)*y(2)-8/3*y(3);
para = odepset('AbsTol', 1E-3, 'RelTol', 1E-3, 'MinStep', 1E-8, 'MaxStep', 1)
[t, y] = ode_rk45('lorenz', [0, 5], [1; 1; 1])