IRIS Toolbox Reference Manual

## db2array

Convert tseries database entries to numeric array

#### Syntax

    [X,Incl,Range] = db2array(D)
    [X,Incl,Range] = db2array(D,List)
    [X,Incl,Range] = db2array(D,List,Range)

#### Input arguments

- `D` [ struct ] - Input database with tseries objects that will be converted to a numeric array.

- `List` [ char | cellstr ] - List of tseries names that will be converted to a numeric array; if not specified, all tseries entries found in the input database, `D`, will be included in the output arrays, `X`.

- `Range` [ numeric | `Inf` ] - Date range; `Inf` means a range from the very first non-NaN observation to the very last non-NaN observation.

#### Output arguments

- `X` [ numeric ] - Numeric array with observations from individual tseries objects in columns.

- `Incl` [ cellstr ] - List of tseries names that have been actually found in the database.

- `Range` [ numeric ] - Date range actually used; this output argument is useful when the input argument `Range` is missing or `Inf`.

#### Description

The output array, `X`, is always NPer-by-NList-by-NAlt, where NPer is the length of the `Range` (the number of periods), NList is the number of tseries included in the `List`, and NAlt is the maximum number of columns that any of the tseries included in the `List` have.

All tseries with more than one dimension (i.e. with more than one column) are always expanded along 3rd dimension only. For instance, a 10-by-2-by-3 tseries will occupy a 10-by-1-by-6 space in `X` at its respective location.

#### Example

IRIS Toolbox. Copyright © 2007—2013 Jaromir Benes.