I'm trying to extract values from a timetable, based on dates from a datetime array. They have different sizes, the datetime array is shorter, and the dates are not in order. Is there any way to use the datetime values as indexing, or use the find function? Thanks!

 채택된 답변

KSSV
KSSV 2021년 8월 3일

1 개 추천

Multiple options.
  1. You can convert them to datenum and use logical, comparisons.
  2. Convert them into same Datetime calss and use logicals, comparisons.

댓글 수: 1

Thanks, I'll try the first one! The second one doesn't seem to work for some reason...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

질문:

2021년 8월 3일

댓글:

2021년 8월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by