Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9300

Re: Equality...

From Adriano Pascoletti <adriano.pascoletti@uniud.it>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Equality...
Date 2012-03-30 09:36 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jl3uri$3ja$1@smc.vnet.net> (permalink)
References <201203290755.CAA21646@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Equality... Adriano Pascoletti <adriano.pascoletti@uniud.it> - 2012-03-30 09:36 +0000

csiph-web