Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: problem with Part function

  • To: mathgroup at
  • Subject: [mg18199] Re: [mg18172] problem with Part function
  • From: "Wolf, Hartmut" <hwolf at>
  • Date: Mon, 21 Jun 1999 22:50:40 -0400
  • Organization: debis Systemhaus
  • References: <>
  • Sender: owner-wri-mathgroup at

Hello Dario,

Casubolo Dario schrieb:
> Just a little problem:
> I've a matrix of zeros, say:
> mat=Table[Table[0,{5}],{5}];
> then, I've a point in xy axys,
> xy={3,3};
> now, I want the position {3,3} of matrix becomes 1;
> if I write
> mat[[xy]]=1; or mat[[{3,3}]]=1; it doesn't work; only mat[[3,3]]=1
> works, but I don't want rewrite all.

The Mathematica Function for doing what you want is


If you want to taste syntactical sugar you have first to convert your
"point" object xy to a sequence:


regards, hw

  • Prev by Date: Re: Plotting discontinuous lines
  • Next by Date: Re: Inserting Adobe pdf files in ver. 4 notebooks
  • Previous by thread: problem with Part function
  • Next by thread: Re: problem with Part function