Function Sort to find smallest value in a Column?
1 回表示 (過去 30 日間)
古いコメントを表示
I'm trying to find the five smallest value corresponding to their exact date from this weekly time series. What I wrote is the following:
tsStocks=fints(DATE, SP500)
Five_smallest_Value=sort(tsStocks,1,'ascend')
And i get this error:
Undefined function 'sort' for input arguments of type 'fints'.
Anyone able to tell me the right way to find them?
Thanks in advance.
0 件のコメント
回答 (1 件)
dpb
2016 年 2 月 25 日
Don't have Toolbox here so can't try it, but looks like you'll want the sortfts function to deal with a FTSOBJ
2 件のコメント
dpb
2016 年 2 月 25 日
From the above doc --
Arguments
tsobj
Financial time series object.
flag
(Optional) Sort order:
flag = 1; increasing order (default)
flag = -1; decreasing order
Of course, even if it didn't have the flag optional argument, simply reversing the increasing order after sorting will produce the decreasing order vector.
参考
カテゴリ
Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!