Ask Your Question
0

implement and plot meijerg

asked 13 years ago

anonymous user

Anonymous

updated 10 years ago

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)?

Preview: (hide)

Comments

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

kcrisman gravatar imagekcrisman ( 13 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 13 years ago

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.

Preview: (hide)
link

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: 13 years ago

Seen: 407 times

Last updated: Jan 17 '12