Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

odepset (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: ode

Requires: MathScript RT Module

Syntax

options = odepset

options = odepset(name1, value1, ..., nameN, valueN)

options = odepset(oldopts, 'name1', value1, ...)

options = odepset(oldopts, newopts)

Legacy Name: odeset

Description

Gets or sets the parameters LabVIEW uses to configure an ODE solver. odepset returns a structure containing all parameters and their default values. odepset(name1, value1, ..., nameN, valueN) returns a structure containing all parameters and their specified values or default values if no value is specified for a parameter. options = odepset(oldopts, newopts) overwrites the corresponding parameters in oldopts with the specified parameters in newopts.

Details

Examples

Inputs

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.
oldopts Specifies a structure containing the parameters for the ODE solver.
newopts Specifies a structure containing the parameters for the ODE solver. The parameters in the newopts will alter those corresponding values in the oldopts to form options.

Outputs

Name Description
options Returns the final structure containing the parameters for the ODE solver.

Details

When you use odepset(name1, value1, ..., nameN, valueN) to set parameters, the settings you configure apply to all MathScript ODE functions in the ode class if you do not use a structure to pass the parameters. The settings apply until you overwrite the parameters using odepset(name1, value1, ..., nameN, valueN) or until you close LabVIEW.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine No
Supported on RT targets No

Examples

% 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);
odepset('AbsTol', 1E-3, 'RelTol', 1E-3, 'MinStep', 1E-8, 'MaxStep', 1)
[T, Y] = ode_rk45('lorenz', [0, 5], [1; 1; 1])

options = odepset
[T2, Y2] = ode_rk23('lorenz', [0, 5], [1; 1; 1], options)

newopts = odepset(options, 'AbsTol', 0.01)
[T3, Y3] = ode_rk23('lorenz', [0, 5], [1; 1; 1], newopts)

Related Topics

ode_adams
ode_bdf15
ode_bdf23
ode_rk23
ode_rk45
ode_rosen


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit