|
[Date Index]
[Thread Index]
[Author Index]
Re: Counting list elements above/below a given value
- To: mathgroup at smc.vnet.net
- Subject: [mg17263] Re: Counting list elements above/below a given value
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 30 Apr 1999 02:34:46 -0400
- Organization: Universitaet Leipzig
- References: <7g0qv1$drj@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Bill,
Count[] need a Pattern[] as its second argument and
Count[Flatten[listname], a_ /; a<value]
will work as expected.
Hope that helps
Jens
"W.W. Sampson" wrote:
>
> I wish to count the number of elements within a list above
> a given value. I can do this using the following:
>
> Length[Select[Flatten[listname], value > #1&]]
>
> However, my list is a 280 x 280 matrix and consequently
> this takes a while to evaluate. My guess is that there
> must be something more efficient. I've tried:
>
> Count[listname, value > #1&]
>
> but the output given is 0, which I know to be incorrect.
>
> Any ideas appreciated.
>
> Bill
Prev by Date:
Re: Solving Eigenvalue Problems
Next by Date:
Re: Keyboard shortcut for switching between open notebooks
Previous by thread:
Re: Counting list elements above/below a given value
Next by thread:
Re: Counting list elements above/below a given value
|