Hour function incompatibility between 2017b and 2018a, alternative possibilities?

1 回表示 (過去 30 日間)
Hi, working on version 2017b, i wrote some code with the hour function in it. Being the time given a char type, showed the hours of it. Now, working on 2018a (running on Mac), now says, Undefined function 'hour' for input arguments of type 'char', tried converting the char to double and num and neither of them worked.
Thanks in advance

採用された回答

Steven Lord
Steven Lord 2018 年 7 月 5 日
There are a couple different hour functions. The two that are most relevant here are the hour method for datetime objects and the hour function in Financial Toolbox.
  • When you call hour with a datetime array as input, you call the method.
  • When you call hour with a double or char input and have Financial Toolbox installed you call the function.
  • When you call hour with a double or char input and don't have Financial Toolbox installed, you receive an error.
So my guess is that your installation of release R2017b has Financial Toolbox installed but your installation of release R2018a does not.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by