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

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Steven Lord
Steven Lord el 5 de Jul. de 2018
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.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by