hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_correg_optget (g02zl)

Purpose

nag_correg_optget (g02zl) is used to query the value of optional parameters available to supported problem solving functions in Chapter G02. Currently, only nag_correg_quantile_linreg (g02qg) is supported.

Syntax

[ivalue, rvalue, cvalue, optype, ifail] = g02zl(optstr, iopts, opts)
[ivalue, rvalue, cvalue, optype, ifail] = nag_correg_optget(optstr, iopts, opts)

Description

nag_correg_optget (g02zl) is used to query the current values of options. It is necessary to initalize optional parameter arrays using nag_correg_optset (g02zk) before any options are queried.
nag_correg_optget (g02zl) will normally return either an integer, real or character value dependent upon the type associated with the optional parameter being queried. Whether the option queried is of integer, real or character type is indicated by the returned value of optype.
Information on optional parameter names and whether these options are real, integer or character can be found in Section [Optional Parameters] in (g02qg).

References

None.

Parameters

Compulsory Input Parameters

1:     optstr – string
A string identifying the option whose current value is required. See Section [Optional Parameters] in (g02qg) for information on valid options. In addition, the following is a valid option:
IdentifyIdentify
nag_correg_optget (g02zl) returns in cvalue the function name supplied to nag_correg_optset (g02zk) when the optional parameter arrays iopts and opts were initialized.
2:     iopts( : :) – int64int32nag_int array
Note: the contents of iopts must not have been altered between calls to nag_correg_optset (g02zk), nag_correg_optget (g02zl) and the selected problem solving routine.
The contents of iopts must not have been altered between calls to nag_correg_optset (g02zk), nag_correg_optget (g02zl) and the selected problem solving function.
3:     opts( : :) – double array
Note: the contents of opts must not have been altered between calls to nag_correg_optset (g02zk), nag_correg_optget (g02zl) and the selected problem solving routine.
The contents of opts must not have been altered between calls to nag_correg_optset (g02zk), nag_correg_optget (g02zl) and the selected problem solving function.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     ivalue – int64int32nag_int scalar
If the optional parameter supplied in optstr is an integer valued parameter, ivalue will hold its current value.
2:     rvalue – double scalar
If the optional parameter supplied in optstr is a real valued parameter, rvalue will hold its current value.
3:     cvalue – string
Note: the string returned in cvalue will never exceed 4040 characters in length.
If the optional parameter supplied in optstr is a character valued parameter, cvalue will hold its current value, unless Identify is specified, see optstr.
4:     optype – int64int32nag_int scalar
Indicates whether the optional parameter supplied in optstr is an integer, real or character valued parameter and hence which of ivalue, rvalue or cvalue holds the current value.
optype = 1optype=1
optstr is an integer valued optional parameter, its current value has been returned in ivalue.
optype = 2optype=2
optstr is a real valued optional parameter, its current value has been returned in rvalue.
optype = 3optype=3
optstr is a character valued optional parameter, its current value has been returned in cvalue.
5:     ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
  ifail = 11ifail=11
On entry, the option in optstr was not recognized.
  ifail = 41ifail=41
On entry, optstr indicates a character optional parameter, but cvalue is too short to hold the stored value. The returned value will be truncated.
  ifail = 61ifail=61
On entry, either the option arrays have not been initialized or they have been corrupted.

Accuracy

Not applicable.

Further Comments

Not applicable.

Example

function nag_correg_optget_example
iopts = zeros(100, 1, 'int64');
opts = zeros(100, 1);
% Initialize the optional argument array
[iopts, opts, ifail] = nag_correg_optset('Initialize = nag_correg_quantile_linreg', iopts, opts);

% Retrieve default values of some optional arguments
[ivalue, rvalue, cvalue, optype, ifail] = nag_correg_optget('Iteration Limit', iopts, opts);

[ivalue, rvalue, cvalue, optype, ifail] = nag_correg_optget('Epsilon', iopts, opts);

[ivalue, rvalue, cvalue, optype, ifail] = nag_correg_optget('Return Residuals', iopts, opts)
 

ivalue =

                    0


rvalue =

     0


cvalue =

NO 


optype =

                    3


ifail =

                    0


function g02zl_example
iopts = zeros(100, 1, 'int64');
opts = zeros(100, 1);
% Initialize the optional argument array
[iopts, opts, ifail] = g02zk('Initialize = g02qg', iopts, opts);

% Retrieve default values of some optional arguments
[ivalue, rvalue, cvalue, optype, ifail] = g02zl('Iteration Limit', iopts, opts);

[ivalue, rvalue, cvalue, optype, ifail] = g02zl('Epsilon', iopts, opts);

[ivalue, rvalue, cvalue, optype, ifail] = g02zl('Return Residuals', iopts, opts)
 

ivalue =

                    0


rvalue =

     0


cvalue =

NO 


optype =

                    3


ifail =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013