Re: For loops with mathematica....

• To: mathgroup at smc.vnet.net
• Subject: [mg101102] Re: [mg101069] For loops with mathematica....
• From: Julien Derr <jderr at cgr.harvard.edu>
• Date: Wed, 24 Jun 2009 06:31:46 -0400 (EDT)
• References: <20090623082433.ZRWPU.18126.imail@eastrmwml28>

Thank you so much everyone for all the interesting/very helpful

Julien

On Jun 23, 2009, at 8:24 AM, Bob Hanlon wrote:

>
> Table[i^2, {i, Flatten[{Range[20, 200, 30], Range[300, 400, 25]}]}]
>
> Do[y = i^2; Print[y];
> Print[i == Sqrt[y]], {i,
>  Flatten[{Range[20, 200, 30], Range[300, 400, 25]}]}]
>
>
> Bob Hanlon
>
> ---- Julien <jderr at cgr.harvard.edu> wrote:
>
> =============
> Hey guys,
>
> I am totally new to mathematica.
> I want to use a simple loop for but with many arguments in the loop...
> the help says to do
>
> Do[ thingstodo, {i,8}]
>
> i will go from 1 to 8 to do thingstodo.
>
> First question: what if I want i to go from 20 then 200 then 300
> then 400, (can we give a sequence as argument?)
>
> Second question: I have a lot of line to do in things to do. should
> I separate everything with a ; (doesn t seem to work, or use a
> procedure or something?)
>
>
> THanks a lot for your help!!!
>
> Julien
>
>

• Prev by Date: Re: Re: Two questions about modification of a matrix.
• Next by Date: Re: Using fractions in axis labels
• Previous by thread: Re: For loops with mathematica....
• Next by thread: Re: For loops with mathematica....