MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: create a List in a Do loop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79250] Re: [mg79245] create a List in a Do loop
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Sun, 22 Jul 2007 04:19:50 -0400 (EDT)
  • References: <11190026.1185009580239.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

Try something like

list = First@Last@Reap@Table[condition&&Sow[element],iterator1,iterator2]

where "condition" could be Sqrt[6.8*10^(-23)] <= masse2[mu1, mu2, mu3,L1,  
L2, L3] <=
   Sqrt[9.3*10^(-23)] &&
  Sqrt[1.1*10^(-21)] <= masse3[mu1, mu2, mu3, L1, L2, L3] <=
   Sqrt[3.7*10^(-21)]

the iterators are

{mu1, 1*10^(-6), 1*10^(-3), 5*10^(-6)} and {mu2, 1*10^(-6), 1*10^(-3),  
5*10^(-6)}

and you haven't specified what "element" would be.

Bobby

On Sat, 21 Jul 2007 03:42:48 -0500, liloi <iop at yopmail.com> wrote:

> hello,
>
> i would like to  make a list included in a do loop
> and mu3,L1,L2,L3 are constants
>
>
>
> Do[If[Sqrt[6.8*10^(-23)] <= masse2[mu1, mu2, mu3, L1, L2, L3] <=
>         Sqrt[9.3*10^(-23)] &&
>      Sqrt[1.1*10^(-21)] <= masse3[mu1, mu2, mu3, L1, L2, L3] <=
>         Sqrt[3.7*10^(-21)],HERE THE LOOP MAY BE GENERATED
>    , Continue[]],
>  {mu1, 1*10^(-6), 1*10^(-3), 5*10^(-6)}, {mu2, 1*10^(-6), 1*10^(-3),
>     5*10^(-6)}]
>
>
>
>
>
>
>
> i tried table but i failed because table must have a  imax known before   
> starting the creation of the list
>
>



-- 

DrMajorBob at bigfoot.com


  • Prev by Date: Re: export data to spreadsheet
  • Next by Date: Re: Drivers for 3DConnexions SpaceNavigator/Ball ?
  • Previous by thread: create a List in a Do loop
  • Next by thread: Re: create a List in a Do loop