MathGroup Archive 2007

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

Search the Archive

Re: question about For


Hi,

hmm ... and the other functions like Table[]

t=Table[i,{i,4}]

do not help ?
And ..

t={};
For[i=1,i<5,
   Print[i];
   AppendTo[t,i++]
  ]

Regards
   Jens

Ary Adilson Morales Alvarado wrote:
> Dear friends,
> 
> I would like to know how to save the data from a For loop.
> 
> Something like that:
> 
> t=For[i = 1, i < 5, Print[i]; i++]
> 
> t={1, 2, 3, 4}
> 
> Thanks in advance
> 
> Ary
> 
> 
> 


  • Prev by Date: Re: Monitor bug or feature
  • Next by Date: Re: FullSimplify with Pi
  • Previous by thread: Re: question about For
  • Next by thread: Re: question about For