databank.retrieveColumns
(+databank)
Retrieve selected columns from databank fields
Syntax
outputDb = function(inputDb, refs,...)
Input Arguments
inputDb
[ struct | Dictionary ]
Input databank from whose fields the selected columns given by the
ref
will be extracted and included in theoutputDb
.
refs
[ numeric | cell ]
References to columns that will be retrieved from the fields of the
inputDb
; the references can be either numeric (refering to 2nd dimension) or a cell array (referring to multiple dimensions starting from 2nd).
Output Arguments
outputDb
[ struct | Dictionary ]
Output databank with the fields from the
inputDb
reduced to the selected columnsrefs
; what happens when the columns cannot be retrieved from a field is determined by the optionWhenFails
.
Options
WhenFails="remove"
[ "error" | "keep" | "remove" ]
This option determines what happens when an attempt to reference and retrieve the selected columns from a field fails (when Matlab throws an error):
"error"
- an error will be thrown listing the failed fields;
"keep"
- the field will be kept in theoutputDb
unchanged;
"remove"
- the field will be removed from theoutputDb
.