MathGroup Archive 1995

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

Search the Archive

Replacing a part of a list/matrix?


I am trying to assign a value to a matrix position, such as:

        pop[[ x,y ]] = value

in a module function. When I try manually assigning a value
to the matrix position outside of the module, it works. When
I run the function with the statement, Mathematica gives me
the following error message:

Part::setps:

        {{1, 1, 0, 0}, <<1>>}
          in assignment of part is not a symbol.

Can anyone tell me how to get the assignment statement to
work! I isolated the problem in the function to this line
and I am sure that what I just described was the problem.
I have tried using the command:

        pop=ReplacePart[pop,value,{x,y}]

but it gives me even more error messages! Help me please!
I appreciate any help. Thanks.

O. Lee


  • Prev by Date: C++
  • Next by Date: C++
  • Previous by thread: RE: C++
  • Next by thread: Replacing a part of a list/matrix?