MATLAB Answers

Why do I get an error when I use the GAMMAINC function with complex input in MATLAB 7.8 (R2009a)?

8 views (last 30 days)
I am trying to use the GAMMAINC function with complex input but receive an error. In MATLAB 7.7 (R2008b) I received a different output.
Reproduction steps:The GAMMAINC command behaves differently in MATLAB 7.7 (R2008b) and MATLAB 7.8 (R2009a):
In MATLAB 7.8 (R2009a) when running the following code:
I receive the following error:
??? Error using ==> gammainc
Inputs must be real, full, and double or
In MATLAB 7.7 (R2008b) I got the following results:
ans =

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This is the expected behavior in MATLAB 7.8 (R2009a).
As per the documentation for the GAMMAINC function in MATLAB 7.8 (R2009a) , the function is not intended to work with complex inputs. The fact that that worked in MATLAB 7.7 (R2008b) was unintentional. In the latest version of MATLAB, hard error checking has been added and the error message is intended.
In earlier versions if you were getting answers that were satisfactory, a workaround would be to make a local copy of the code from the earlier version. However, note that this is not supported.


Sign in to comment.

More Answers (1)


No tags entered yet.




Community Treasure Hunt

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

Start Hunting!

Translated by