While using the built-in relieff method, I am getting an error : " Undefined function exp for input arguments of type int64 ".

14 vues (au cours des 30 derniers jours)
While using the relieff method, I am getting an error : " Undefined function exp for input arguments of type int64 ". What are the possible reasons for this? I know that undefined function errors come when the method is not in the path. But here I am calling a built-in function, which is supposed to be in the path.

Réponses (1)

Walter Roberson
Walter Roberson le 5 Juil 2017
You are calling a built-in function, but you are calling it passing in something that is a 64 bit integer data type, and that is not an operation that has been built-in. If you are certain that the integer does not exceed 2^53 then you can exp(double(TheVariable)) . But keep in mind that exp(708) is about as large as you can go without hitting infinity, and since the output is required to be the same data type as the input, exp() of an int64 would be required an integer data type representation of infinity, which does not exist.

Catégories

En savoir plus sur Argument Definitions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by