Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Did something change?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58128] Re: [mg58109] Did something change?
  • From: Adel Elsabbagh <aelsabbagh at gmail.com>
  • Date: Sun, 19 Jun 2005 03:43:33 -0400 (EDT)
  • References: <200506181008.GAA08878@smc.vnet.net>
  • Reply-to: Adel Elsabbagh <aelsabbagh at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

I am not a Mathematica professional but as far as I know, you cannot do
such assignment.

You'd better do the following:

F = Table[0, {i, 10}, {j, 8}, {k, 8}];  (*initialize a tensor of size 10x8x8*)
Do[F[[i]] = IdentityMatrix[8]; F[[i, 1, 3]] = 7, {i, 10}]; (*Fill the elements*)


-Adel Elsabbagh



On 6/18/05, Ronald Bruck <bruck at math.usc.edu> wrote:
> Recently I created a list of several matrices, something like
> 
>   Do[F[i] = IdentityMatrix[8]; F[i][[1,3]] = 7, {i,10}]
> 
> and was surprised to get the message that F[i] wasn't a symbol.  I'm
> pretty sure code similar to that worked prior to Mathematica 5.  Did
> something change?
> 
> I've also tried Symbolize[F[i]] in that loop, but it doesn't help;
> Mathematica refuses to access part [[1,3]] of F[i], claiming F[i] isn't
> a symbol.
> 
> How are you supposed to set the individual values of a matrix if you
> can't do this?  This is an EXTREMELY unhelpful "feature".
> 
> --Ron Bruck
> 
> 


-- 
Adel


  • Prev by Date: Re: Did something change?
  • Next by Date: Re: associative arrays
  • Previous by thread: Did something change?
  • Next by thread: Re: Did something change?