Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Tag List Protected error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113774] Re: Tag List Protected error
  • From: niobe <ben.carbery at gmail.com>
  • Date: Thu, 11 Nov 2010 06:11:47 -0500 (EST)
  • References: <ib5u05$c0j$1@smc.vnet.net> <ib8csq$2fn$1@smc.vnet.net>

> Could you provide a x, y pair that reproduce this error?

x={{7, 9, 0, 0, 10}, {4, 0, 3, 10, 9}, {4, 9, 0, 5, 0}, {0, 2, 1, 8,
5}, {2, 5, 3, 4, 4}, {1, 0, 4, 0, 0}, {1, 10, 6, 8, 9}}
y={{4, 5}, {3, 1}, {2, 6}}

> I would avoid using ReplacePart.  If I understand your example
> correctly...
>
> y is a ragged array: {{row}, {col0, col1}}

Think of x as a lists of quantities and y as rules for adjusting them.
So in this example of y, decrement x[[4,3]] by 2, increment x[[5,3]]
by 2, increment x[[4,1]] by 6, decrement  x[[5,1]] by 6,
But the point is that the operation works when not delayed. It seems
like the way command is being parsed is the problem as Mathematica is
thinking that the ReplacePart syntax is actual an operation on one of
the arguments. I am hoping there is a way to force the correct
interpretation.


  • Prev by Date: shooting method, boundary value problem
  • Next by Date: Re: 2-D Fourier Transform?
  • Previous by thread: Re: Tag List Protected error
  • Next by thread: Re: Programmatically creating functions of many