How to animate the change in a variable with respect to date and time in matlab?

2 ビュー (過去 30 日間)
Niraj Bal Tamang
Niraj Bal Tamang 2021 年 4 月 16 日
コメント済み: Niraj Bal Tamang 2021 年 4 月 21 日
I have an excel file with date, time and depth columns. I want to animate the change in the depth from the start of the date to the end along with time running in the display. The time is also showing in decimal number instead of the hh:mm:ss format. Can anyone please help me with this?

回答 (1 件)

Monisha Nalluru
Monisha Nalluru 2021 年 4 月 21 日
From my understanding, you want to display the time value in the axes instead of decimal values.
You can use datetime function to convert decimal values to date format and then animate the depth with time
As an example
dates = datetime(excelDates,'ConvertFrom','excel') % or 'excel1904'
% now animate time and depth
  1 件のコメント
Niraj Bal Tamang
Niraj Bal Tamang 2021 年 4 月 21 日
I tried but it didn't worked. The error that i got was:
'Input data must be one numeric matrix when converting from a different date/time representation.'
I have also uploaded the data file. Can you please let me know if the datetime works for this or not?
Thank you

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by