Financial Time Series    
subsref

Subscripted reference

Description

subsref implements indexing for a financial time series object. Integer indexing or date string indexing is allowed. Serial dates numbers may not be used as indices.

To use date string indexing, enclose the date string(s) in a pair of single quotes ' '.

You can use integer indexing on the object as in any other MATLAB matrix. It will return the appropriate entry(ies) from the object.

Additionally, subsref lets you access the individual components of the object using the structure syntax.

Examples

Create a time series named myfts.

Extract the data for the single day July 1, 1998.

Now, extract the data for the range of dates July 1, 1998 through July 5, 1998.

You can use the MATLAB structure syntax to access the individual components of a financial time series object. To get the description field of myfts, enter

at the command line, which returns

Similarly

returns

See Also

datestr in the Financial Toolbox User's Guide.

fts2mtx, subsasgn


 subsasgn times