MathGroup Archive 2002

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

Search the Archive

Re: Nonatomic expression ? in Append command

  • To: mathgroup at
  • Subject: [mg32857] Re: [mg32832] Nonatomic expression ? in Append command
  • From: Tomas Garza <tgarza01 at>
  • Date: Fri, 15 Feb 2002 02:50:07 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

I suggest you devote some time to learning functional programming, which is
one of the great beauties of Mathematica, and forget all about loops and
procedural programming.

Anyway, it is not clear to me what is it you're trying to achieve in your
routine below. To start with, since no initial value is assigned to
omegaAlist, it is clear that you can't Append anything to it in the first
loop. This is why you get the message.

Secondly, surely you are aware that r++ increases the value of r by 1,
returning the old value of r. Then you cannot go further than the first
loop, since the test r<=1 gives False immediately after the first loop.

Tomas Garza
Mexico City

----- Original Message -----
From: "Takayuki MAKINO" <tmakino at>
To: mathgroup at
Subject: [mg32857] [mg32832] Nonatomic expression ? in Append command

> bonjour
> I am very happy to meet you all. My name is Takayuki. It is my great
> pleasure to know the existense of such beautiful community. I would like
> to perform the loop calculation by writing the following code in
> Mathematica. Then, the result of calculation should be stored in some
> lists, assuming the name of list is "omegaAlist". If one performs that
> code, the error message will be output. The contents of which is the
> following:
> (1)「Append::"normal": "Nonatomic expression expected at position 1
> in Append[omegaAlist, 0.007]."」
> (2)「$RecursionLimit::"reclim": "Recursion depth of \!\(256
> \) exceeded."」
> I do not know how to work around this problem. Please help me to
> eliminate this obstacle, if there are experts who are familiar with
> these kinds of things.!!!
> ------------------------------------------------
> Clear[et1,omegaAlist]
> For[r =0, r <= 1, r++
> et1 = 3.444 + r*0.001
> omegaAlist = Append[omegaAlist, N[et1]];
> ]
> omegaAlist = Delete[omegaAlist, 1];

  • Prev by Date: Partitions
  • Next by Date: Re: simulating random variables
  • Previous by thread: Nonatomic expression ? in Append command
  • Next by thread: Re: Nonatomic expression ? in Append command