Counting list elements above/below a given value
- To: mathgroup at smc.vnet.net
- Subject: [mg17202] Counting list elements above/below a given value
- From: "W.W. Sampson" <w.sampson at umist.ac.uk>
- Date: Mon, 26 Apr 1999 01:20:43 -0400
- Organization: Department of Paper Science, UMIST
- Sender: owner-wri-mathgroup at wolfram.com
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