MathGroup Archive 1999

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

Search the Archive

Re: Protected element error

  • To: mathgroup at
  • Subject: [mg17269] Re: Protected element error
  • From: "David Keith" <dkeith at>
  • Date: Fri, 30 Apr 1999 02:34:49 -0400
  • Organization: Hevanet Communications
  • References: <7g0van$>
  • Sender: owner-wri-mathgroup at



"A"<>sur<>"x"[1,1]=Input["New a33 x value"]];

the left hand side is a string, not a symbol. As written it has Head
StringJoin and you can't assign a value to that. Symbol[] turns a string
into a symbol, but to use it on the left side you need to let Mathematica
evaluate the left side by using Release[].

Try assigning this way:

Release[Symbol["A"<>sur<>"x"] [[1,1]] ] = Input["New a33 x value"]];

This group has far better programmers than I, so you may well get a better


Kristen Rounds wrote in message <7g0van$e8n at>...
>Early in my program I define a 4x4 matrix:
>Later I wish to allow the user to modify a matrix element:
>"A"<>sur<>"x"[1,1]=Input["New a33 x value"]];
>I am getting this error when I try to use the new A1x matrix:
>SetDelayed::write: Tag StringJoin in A<>1<>x is Protected.
>I tried to use Unprotect[A1x]; prior to the new input, but that
>doesn't seem to make a difference.
>Please explain this error, and if there is a way to avoid it.  Thanks.

  • Prev by Date: Arciving data in Oracle to comma delimited values???
  • Next by Date: Re: Counting list elements above/below a given value
  • Previous by thread: RE: Protected element error
  • Next by thread: Re: Protected element error