Re: For loop outputs to a list
- To: mathgroup at smc.vnet.net
- Subject: [mg112899] Re: For loop outputs to a list
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Tue, 5 Oct 2010 05:34:56 -0400 (EDT)
- References: <firstname.lastname@example.org>
You might consider reading the manual before posting questions. There is really a huge amount of information available right at your finger tips (Help menu/Documentation centre or just F1). Constructing lists is a very basic activity in Mathematica. One function you could try to look up here is Table. Cheers -- Sjoerd On Oct 4, 12:07 pm, matthew <mattyp... at gmail.com> wrote: > Hello, I'm a bit rubbish at mathematica and I've tried searching this > group for help. > > For[i = 0, i < 10^6, i++, > If[Abs[Re[LS2[0.004 + i*Pre]] - Re[RS[0.004 + i*Pre]]] < 10^-7 , > Print[N[0.004 + i*Pre]] > If[0.004 + i*Pre > 0.007, Break] > ]]; > > which gives me an output of: > 0.00424538 > > 0.00448576 > > 0.00514995 > > 0.00584308 > > 0.00584309 > > 0.00646176 > > 0.00758337 > > How would I get these into a list or some way i can manipulate it?