MathGroup Archive 2005

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

Search the Archive

Re: filling in an array


b=Array[#/10&,{10}]

or

b=Table[i/10,{i,1,10}]

or

b=Range[10]/10

Bobby

On Sat, 19 Mar 2005 04:47:07 -0500 (EST), dumb_founded <andreajagger_8 at hotmail.com> wrote:

> How can I input values into an array most efficiently?  I tried the
> code below, but it doesn't work.  The kernel starts working through the
> loop and never gets out.
>
> Array[b, 10];
> For[i = 1, i = 10, b[i] = i/10]
>
>
>
>



-- 
DrBob at bigfoot.com


  • Prev by Date: Do loop is faulty
  • Next by Date: simple cipher
  • Previous by thread: filling in an array
  • Next by thread: Re: filling in an array