MathGroup Archive 1998

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

Search the Archive

Re: list assignment problem



Hi Abdallah,

Use jlist[[1,2]]=6 instead of jlist[[1]][[2]]=6.

Jrgen

-----Original Message-----
From: Abdallah Rayhan <rayhan@ece.uvic.ca> To: mathgroup@smc.vnet.net
Subject: [mg12471] [mg12434] list assignment problem


>
>Hi Mathematica Lovers,
>
>I am trying to write a program that requires handling 3D list. I am
>faced with this problem which is unable to change the values of the
>list. For example, when I run the following lines, I get this error
>msg: Part::setps: jlist[[1]] in assignment of part is not a symbol.
>
>In[294]:= jlist={{1,2},{3,4}}
>
>Out[294]= {{1, 2}, {3, 4}}
>
>In[295]:= jlist[[1]][[2]]=6
>
>Part::setps: jlist[[1]] in assignment of part is not a symbol.
>
>Out[295]= 6
>
>I would appreciate if any one could tell me what I am doing wrong ?
>
>regards
>Rayhan
>
>




  • Prev by Date: Re: Problem defining transformation rules
  • Next by Date: Re: Viewing 3D slices of data
  • Prev by thread: Re: list assignment problem
  • Next by thread: Re: list assignment problem