[SciPy-User] Help - scipy.integrate
Warren Weckesser
warren.weckesser at enthought.com
Wed Nov 10 09:41:37 EST 2010
On Wed, Nov 10, 2010 at 8:25 AM, Waléria Antunes David <
waleriantunes at gmail.com> wrote:
> Yeah, i'm considering omega_k = 0 ..yeah i implemented equation (12) :
> http://pastebin.com/SHTKcMNU ... line 47
>
>
'func' should not be creating and returning the list 'm'. 'func' should
return a single value--the value of the integrand. So you could try
changing line 45 from 'Dl = a*f' to 'return a*f'. Then your call to romberg
computes d_L, and you will need to compute mu with that value. If you are
going to generate a graph, you will also need a loop somewhere to compute
the integral for a sequence of values. Currently you are only computing the
integral with fixed limits (z=0 to z=1.5).
Also, if omega_k is 0.0, then the condition in line 14 will be False, and
lines 16-26 will not be executed.
Warren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20101110/5aa522e4/attachment.html>
More information about the SciPy-User
mailing list