MathGroup Archive 1999

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

Search the Archive

Re: assignment of matrix elements

  • To: mathgroup at
  • Subject: [mg17261] Re: assignment of matrix elements
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 30 Apr 1999 02:34:45 -0400
  • Organization: Universitaet Leipzig
  • References: <7g0r8r$>
  • Sender: owner-wri-mathgroup at

Hi Richard,



the line

Apply[Set[Part[m,Sequence @@ #1],#2]&,#] &/@Transpose[{index,val}];

will do what you want


Richard Finley wrote:
> This seems like it should be straightforward but I am too tired to think
> about it anymore:
> If you have a matrix say mat = Array[m, {4,4}]


> Obviously you can do it individually by simple assignment:
> m{1,2]=1
> That won't work for me because there are thousands of elements...the
> techniques I have tried so far
> have not worked...any help is greatly appreciated.
> Thanks
> Richard Finley

  • Prev by Date: re: my previous question on matrix element assignment
  • Next by Date: Re: Question: getting list data into a matrix
  • Previous by thread: Re: assignment of matrix elements
  • Next by thread: directory and file structure