Hi,
i have a question concerning timetables.
The situation is as follows:
I have two timetables TT1 and TT2. From TT1 i get a timestamp e.g. TT1.time(3) (let's say '11:15:00'). I know that this timestamp is also present in TT2 but not a the same location (due to other samplerate). How can I find the value of var1 in TT2 at the given timestemp ('11:15:00')?
Thank you for your answers.

 채택된 답변

Sebastian Ehrismann
Sebastian Ehrismann 2021년 4월 29일
편집: Sebastian Ehrismann 2021년 4월 29일

0 개 추천

I found the solution:
TT2.val1(TT1.Date_Time(3)) gives you the value at the given timestamp

추가 답변 (1개)

Steven Lord
Steven Lord 2021년 4월 29일

0 개 추천

If you know it's in there exactly use ==. If you think there's a close match but maybe not exactly the same times I would create a timerange covering a couple seconds or minutes around that time (whatever the "close" in "close match" is) and use that timerange to index into the second timetable.

댓글 수: 1

Could you elaborate on the syntax while using ==?
Is it possible to use it as one command? i want to check if the value in TT2 is greater then x.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by