Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Gamma Function & Imaginary argument

Subject: Gamma Function & Imaginary argument

From: Eric Diaz

Date: 12 Mar, 2010 00:16:06

Message: 1 of 3

Dear Matlab community,

I would like to use an imaginary input argument in the provided gamma function to test out a theory from literature. However, when I put the my argument in, gamma(1/2+i*omega), I received the following error.

??? Undefined function or method 'gamma' for input arguments of type
'double' and attributes 'full scalar complex'.

The documentation for this function also states that the input must be real. Nevertheless, the literature clearly shows the usage of imaginary arguments.

So, my questions are:
1.) Is there any reason that this function will not take imaginary inputs?
2.) Is there any way around this?

Thanks,

Eric Diaz

Subject: Gamma Function & Imaginary argument

From: Sadik

Date: 12 Mar, 2010 00:43:04

Message: 2 of 3

Hi Eric,

1) I am sorry, I don't know.
2) mcgama.m on page http://ceta.mit.edu/ceta/comp_spec_func/
    should work for you.

Best.



"Eric Diaz" <eric.diaz@gmail.com> wrote in message <hnc146$kpp$1@fred.mathworks.com>...
> Dear Matlab community,
>
> I would like to use an imaginary input argument in the provided gamma function to test out a theory from literature. However, when I put the my argument in, gamma(1/2+i*omega), I received the following error.
>
> ??? Undefined function or method 'gamma' for input arguments of type
> 'double' and attributes 'full scalar complex'.
>
> The documentation for this function also states that the input must be real. Nevertheless, the literature clearly shows the usage of imaginary arguments.
>
> So, my questions are:
> 1.) Is there any reason that this function will not take imaginary inputs?
> 2.) Is there any way around this?
>
> Thanks,
>
> Eric Diaz

Subject: Gamma Function & Imaginary argument

From: Eric Diaz

Date: 12 Mar, 2010 01:06:05

Message: 3 of 3

Thanks Sadik,

I think this will work with a little bit of editing.

Cheers,

Eric

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us