MathGroup Archive 2012

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

Search the Archive

Re: Equality...


Evaluate the l.h. side:

In[3]:= Evaluate[Array[Subscript[a, #1, #2] & , {3, 4}]] =
 Array[RandomReal[1], {3, 4}]
Out[3]= {{0.10417076732503783[1, 1], 0.10417076732503783[1, 2],
  0.10417076732503783[1, 3],
     0.10417076732503783[1, 4]}, {0.10417076732503783[2, 1],
  0.10417076732503783[2, 2],
     0.10417076732503783[2, 3], 0.10417076732503783[2, 4]},
   {0.10417076732503783[3, 1], 0.10417076732503783[3, 2],
  0.10417076732503783[3, 3],
     0.10417076732503783[3, 4]}}


Adriano Pascoletti

2012/3/29 Roozbeh <rhazrat at gmail.com>

> Hi,
>
> I have a matrix with nxn varaibles an entry and want to assign values
> to each of the entries. How can I do this in one go?
>
> I was hoping something like this works, but it doesn't...
>
> Array[Subscript[a, #1, #2] &, {3, 4}] = Array[Random[1], {3, 4}]
>
> Any tips are apprecited.
>
> R
>
>


  • Prev by Date: Re: Extract XLM data from in Mathematica
  • Next by Date: Re: Typesetting in Mathematica (TraditionalForm typesetting?)
  • Previous by thread: Re: Equality...
  • Next by thread: Re: Equality...