Financial Time Series    
sortfts

Sort financial time series

Syntax

Arguments

tsobj
Financial time series object
seriesnames
(Optional) String containing a data series name or cell array containing a list of data series names
flag
(Optional) Sort order:
flag = 1; increasing order (default)
flag = -1; decreasing order

Description

sfts = sortfts(tsobj, flag) sorts the financial time series object tsobj in increasing order based upon the 'dates' vector.

sfts = sortfts(tsobj, flag) sets the order of the sort. flag = +1 increases date order. flag = -1 decreases date order.

sfts = sortfts(tsobj, seriesnames, flag) sorts the financial time series object tsobj based upon the data series name(s) seriesnames. If the optional flag is set to -1, the sort is in decreasing order.

[sfts, sidx] = sortfts(...) additionally returns the index of the original object tsobj sorted based on 'dates' or specified data series name(s).

See Also

sort and sortrows in the MATLAB documentation


 smoothts spctkd