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

14 次查看(过去 30 天)
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.

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by