| Financial Time Series Toolbox | ![]() |
Syntax
sfts = sortfts(tsobj) sfts = sortfts(tsobj, flag) sfts = sortfts(tsobj, seriesnames, flag) [sfts, sidx] = sortfts(...)
Arguments
Description
sfts = sortfts(tsobj)
sorts the financial time series object tsobj in increasing order based only upon the 'dates' vector if tsobj does not contain time-of-day information. If the object includes time-of-day information, the sort is based upon a combination of the 'dates' and 'times' vectors. The 'times' vector cannot be sorted individually.
sfts = sortfts(tsobj, flag)
sets the order of the sort. flag = 1: increasing date and time order. flag = -1: decreasing date and time order.
sfts = sortfts(tsobj, seriesnames, flag)
sorts the financial time series object tsobj based upon the data series name(s) seriesnames. The seriesnames argument can be a single string containing a data series name or a cell array containing a list of data series names. 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 | ![]() |