MathGroup Archive 2007

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

Search the Archive

Re: AW: position of matrix elements for intervals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78487] Re: AW: position of matrix elements for intervals
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Tue, 3 Jul 2007 05:21:56 -0400 (EDT)

On 7/2/07 at 6:46 AM, kristophs.post at web.de (Kristoph Steikert)
wrote:

>Do you have an idea how to allocate the position of the first
>element satisfying the condition of each column from below?

>Example: data = {{1, 1.`, 0.9999999932328848`}, {1.`,
>0.9985849617864345`,
>3.7570598417296495`*^-108}, {0.9999999999267634`,
>4.0643593704937925`*^-207, 0}};

>I'm looking for the position from below of the first element in each
>column meeting #>=0.99.

>The output should be: {{1,3},{2,2},{3,1}}

That output can be obtained from your example with:

In[7]:= Last /@
  Split[Position[data, _?(# >= 0.99 &)], Equal @@ (First /@
{##}) &]

Out[7]= {{1, 3}, {2, 2}, {3, 1}}
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Re: problem with Pick
  • Next by Date: Re: Re: problem with Pick
  • Previous by thread: AW: position of matrix elements for intervals
  • Next by thread: Re: AW: position of matrix elements for intervals