Financial Time Series Toolbox    
getfield

Get content of a specific field

Syntax

Arguments

tsobj
Financial time series object
field
Field name within tsobj
dates
Date range. Dates can be expanded to include time-of-day information.

Description

getfield treats the contents of a financial times series object tsobj as fields in a structure.

fieldval = getfield(tsobj, field) returns the contents of the specified field. This is equivalent to the syntax fieldval = tsobj.field.

fieldval = getfield(tsobj, field, {dates}) returns the contents of the specified field for the specified dates. dates can be individual cells of date strings or a cell of a date string range using the :: operator such as
'03/01/99::03/31/99'.

Examples

Create a financial time series object containing both date and time-of-day information:

Example 1. Get the contents of the times field in AnFts:

Example 2. Extract the contents of specific data fields within AnFts:

See Also

chfield, fieldnames, isfield, rmfield, setfield


  ftsuniq getnameidx