       Re: Mathematica Numerical Integration and For Loop

• To: mathgroup at smc.vnet.net
• Subject: [mg81971] Re: [mg81947] Mathematica Numerical Integration and For Loop
• From: bsyehuda at gmail.com
• Date: Mon, 8 Oct 2007 00:02:14 -0400 (EDT)
• References: <200710070935.FAA20433@smc.vnet.net>

For loops return Null (the same for  Do loops)
Table returns the required result

Table[NIntegrate[
ref[\[Lambda], \[Theta], \[Phi], Pi/5, (2*Pi)/5], {\[Theta], 0,
Pi},
{\[Phi], 0, 2*Pi}], {\[Lambda], 0, 10, 0.01}]

best
yehuda

On 10/7/07, General <mammasis82 at hotmail.com> wrote:
>
> Hi,
>
> I have a function which I have numerically integrated in Mathematica. I
> would like to be able to change a parameter of that function and re-evaluate
> that integral and then record the answer.
>
> Since this needs to be done for vary small changes of that independent
> variable it would be impossible for me to sit down and do it one by one.
>
> I am thinking of using a for loop but I cannot understand how to use it in
> my case.
>
> I would appreciate anyones help/
>
> Here is the form of the function that I am integrating
>
> NIntegrate[
> ref[\[lambda], \[Theta], \[Phi], \[Pi]/5, (2 \[Pi])/5], {\[Theta],
>   0, \[Pi]}, {\[Phi], 0, 2 \[Pi]}]
>
> I would like to be able to change the first variable within my ref
> function. This is lambda. So I want lambda to take different values within a
> range of 0 to 10 with increments of 0.01 and then store the output of the
> numerical integration. I would then like to plot lambda against the values
> obtained from the numerical integration.
>
> Thanks
>
> Regards
>
> Alex
>
>

• Prev by Date: Re: Mathematica Numerical Integration and For Loop
• Next by Date: help please with a non-working V6 palette
• Previous by thread: Mathematica Numerical Integration and For Loop
• Next by thread: Re: Mathematica Numerical Integration and For Loop