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

Output arguments

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.

If all tseries data have the same size in 2nd and higher dimensions, the output array will respect that size in 3rd and higher dimensions. For instance, if all tseries data are NPer-by-2-by-5, the output array will be NPer-by-Nx-by-2-by-5. If some tseries data have unmatching size in 2nd or higher dimensions, the output array will be always a 3D array with all higher dimensions unfolded in 3rd dimension.

If some tseries data have smaller size in 2nd or higher dimensions than other tseries entries, the last available column will be repeated for the missing columns.

Example