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 1996

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

Search the Archive

Re: Part

  • Subject: [mg2894] Re: [mg2890] Part
  • From: ross at ("Ross Moore <ross at>")
  • Date: 5 Jan 1996 03:50:39 -0600
  • Approved:
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: mj at

Hello Hans,

> w={{1,2,3},{4,5,6},{7,8,9}}
> npos={2,1}
> npos is the position of the element I need.
> w[[npos]]
> does not work, as it returns the second and the first
> line.

No, ...and neither should it, 
since the argument is a List of integers, not a Sequence.

You want:   

or its shorthand   

(Zeus2.2.2) In[8]:= w[[Sequence@@npos]]
(Zeus2.2.2) Out[8]= 4



Ross Moore                         Internet: ross at
Mathematics Department                Work:       +61 2 850-8955
Macquarie University                   Home:   please do not try
North Ryde, Sydney                     Fax:       +61 2 850-8114
Australia  2109

  • Prev by Date: Re: Part
  • Next by Date: Re: Re: Problems with Outer
  • Previous by thread: Re: Part
  • Next by thread: Re: Part