Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Equality...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125727] Re: Equality...
  • From: Adriano Pascoletti <adriano.pascoletti at uniud.it>
  • Date: Fri, 30 Mar 2012 04:34:37 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201203290755.CAA21646@smc.vnet.net>

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
>
>


  • References:
  • 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...