last transaction time
조회 수: 2 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!