setps problem/how to set matrix elements
- To: mathgroup at smc.vnet.net
- Subject: [mg65778] setps problem/how to set matrix elements
- From: Robert James Williamson <sparkles at stanford.edu>
- Date: Mon, 17 Apr 2006 02:28:26 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I get General::setps as an error for the following: FSD[r_, xdim_, ydim_] := Module[{}, r[[1, 1]] = 5;] FSD[r, 256, 256] <-- This command generates the error. Where r is defined as: r = {{0.5, 0.5, 0.5, 0.5}, {0.5, 0.5, 0.5, 0.5}, {0.5, 0.5, 0.5, 0.5}, {0.5, 0.5, 0.5, 0.5}}; I'm confused because I have no problem when I type in: r[[1,1]] = 5 This correctly sets the 1,1 entry of the matrix to 5. Any input on this? Or point me to the FAQ? Kind regards, and many thanks. Rob
- Follow-Ups:
- Re: setps problem/how to set matrix elements
- From: "Szabolcs Horvát" <szhorvat@gmail.com>
- Re: setps problem/how to set matrix elements