Re: Re: Do loop is faulty
- To: mathgroup at smc.vnet.net
- Subject: [mg55409] Re: [mg55390] Re: Do loop is faulty
- From: DrBob <drbob at bigfoot.com>
- Date: Tue, 22 Mar 2005 03:50:59 -0500 (EST)
- References: <d1jfsj$sa4$1@smc.vnet.net> <200503210801.DAA07911@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
> Oops, sorry, I mistyped the code.
Never type code into e-mail. Copy-paste it from Mathematica, after using the menu option Cell>Convert to>InputForm. (Then you can convert the cell back to TraditionalForm or StandardForm.)
Bobby
On Mon, 21 Mar 2005 03:01:57 -0500 (EST), dumb_founded <andreajagger_8 at hotmail.com> wrote:
> Oops, sorry, I mistyped the code. It should read:
>
> Array[c,10];
> Do[c[i]=NIntegrate[a[i]*x*Sin[b[i]*x],{x,0,b[i]}],{i,1,10}]
>
>
>
>
> dumb_founded wrote:
>> I define array a[i] and array b[i] of dimension 10. Then I go
> through
>> the following Do loop, or try to, that is.
>>
>>
>> Array[c,10];
>> Do[c[i]=NIntegrate[a[i]*x*Sin[b[i]*x],{x,0,b[i]}]
>>
>> I get numerous error messages saying that b[i] is not a valid limit
> of
>> integration.
>>
>> This is sheer headache. I will never try to use Mathematica for
>> numerical analysis again.
>>
>> All your efforts on this matter are sincerely appreciated.
>>
>>
>>
>> Thanks
>
>
>
>
--
DrBob at bigfoot.com
- References:
- Re: Do loop is faulty
- From: "dumb_founded" <andreajagger_8@hotmail.com>
- Re: Do loop is faulty