last transaction time

1 回表示 (過去 30 日間)
joseph Frank
joseph Frank 2011 年 8 月 22 日
Hi,
I have vector A of prices and cell array B of time of the transaction that has the following format 12:00:53 ; 13:07:52 etc... I was trying to select the last transaction of the day by using: max(B) but i am receiving an error ??? Undefined function or method 'max' for input arguments of type 'cell'. How can I get the last observation in this case either by sorting prices according to B (then I take th elast one) r by using maximum of B?

採用された回答

Titus Edelhofer
Titus Edelhofer 2011 年 8 月 22 日
Hi,
you need to convert to a number first:
B2 = datenum(B, 'HH:MM:SS');
then take the max(B2).
Titus

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by