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

14 views (last 30 days)
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.

Answers (1)

Walter Roberson
Walter Roberson on 5 Jul 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.

Categories

Find more on Argument Definitions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!