countif equivalent
tortoise
I'm just transforming to Igor from Excel. It's super faster, even if learning curve is steep. ;-)
I need to calculate how many times certain value appears in the wave. Or more specifically, how many values within certain range there are in the wave.
So I'm looking for an equivalent of excel countif option.
Example: wave that looks like this:
1
2
3
4
5
6
7
And I need to know how many values there are from the range 2
Thank you for all help!
Kate
Wave w
Variable minval, maxval // values including or between these values are counted.
Extract/FREE/O w, extracted, w >= minval && w <= maxval
Variable num= numpnts(extracted)
return num
End
Example:
•print CountInRange(data, 3,9)
7
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
June 26, 2012 at 03:59 pm - Permalink
June 26, 2012 at 05:35 pm - Permalink