MathGroup Archive 2004

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

Search the Archive

Re: message 50001?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50020] Re: [mg50001] message 50001?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 12 Aug 2004 05:43:25 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Position[S, Max[S]][[1,1]]

Bob Hanlon

> 
> From: "1.156" <rob at pio-vere.com>
To: mathgroup at smc.vnet.net
> Date: 2004/08/11 Wed AM 05:52:54 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg50020] [mg50001] message 50001?
> 
> Mathematica wizards, I've managed to cripple together code to do 
something that 
> I feel must be doable more easily and/or faster.
> 
> S is a list of reals containing a signal with a prominent peak in 
> amplitude. I simply want to find the index of the peak (x, the number of 
> entries into the list where the peak occurs). Here's what I did.
> 
> 
> For[i = 1, S[[i]] ? max[S], i++, x = i];
> 
> Can some suggest a better way, especially one not using a For loop?
> 
> Thanks, Rob
> 
> 


  • Prev by Date: Re: message 50001?
  • Next by Date: Re: How to install Combinatorica
  • Previous by thread: Re: message 50001?
  • Next by thread: Re: message 50001?