Ask Your Question
0

implement and plot meijerg

asked 2012-01-17 15:38:56 +0100

anonymous user

Anonymous

updated 2015-01-24 13:53:44 +0100

FrédéricC gravatar image

Very new to Sage. Think it is installed correctly and I am using the Notebook interface. Trying to run the meijerg that is supposedly in mpmath but it complains that it can't find the function. I did import mpmath but did not get a response to that command Do I need to download something else? What can I do to get meijerg working (and need to plot)?

edit retag flag offensive close merge delete

Comments

Do 'normal' sage commands like `2+2` work? If so, then @DSM's answer should work.

kcrisman gravatar imagekcrisman ( 2012-01-17 17:29:26 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2012-01-17 15:57:57 +0100

DSM gravatar image

(Hint: when reporting a problem, it's best to cut and paste exactly what you did and any error messages so that we can see where the problems are.)

It seems to work for me:

sage: import mpmath
sage: mpmath.meijerg([[],[]], [[0],[0.5]], (1/2)**2)
mpf('0.30483293293763819')
sage: (cos(1)/sqrt(pi)).n()
0.304832932937638

In the notebook you won't have the "sage:" bits at the start, but it should give you the same results. Alternatively, you could use

from mpmath import meijerg

and then you wouldn't have to add the "mpmath." bit at the start.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-01-17 15:38:56 +0100

Seen: 369 times

Last updated: Jan 17 '12