ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 17 Jan 2012 17:29:26 +0100implement and plot meijerghttps://ask.sagemath.org/question/8634/implement-and-plot-meijerg/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)?
Tue, 17 Jan 2012 15:38:56 +0100https://ask.sagemath.org/question/8634/implement-and-plot-meijerg/Comment by kcrisman for <p>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)? </p>
https://ask.sagemath.org/question/8634/implement-and-plot-meijerg/?comment=20518#post-id-20518Do 'normal' sage commands like `2+2` work? If so, then @DSM's answer should work.Tue, 17 Jan 2012 17:29:26 +0100https://ask.sagemath.org/question/8634/implement-and-plot-meijerg/?comment=20518#post-id-20518Answer by DSM for <p>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)? </p>
https://ask.sagemath.org/question/8634/implement-and-plot-meijerg/?answer=13135#post-id-13135(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.Tue, 17 Jan 2012 15:57:57 +0100https://ask.sagemath.org/question/8634/implement-and-plot-meijerg/?answer=13135#post-id-13135