Please help! Need to find 20th, 40th, 60th, etc. percentiles for a given wave.


I am writing a simple procedure to find several percentiles for a wave. I found the fwavepercentiles() function, but have no idea how to use it. Was not successful finding an explanation in the IgorHelp, so I was hoping maybe someone on here would know.

How does the input to this function work? And could you also please explain the output, for example, what is Q_N?

Any help would be appreciated. Thank you so much!


Which percentiles do you need?  If it is the standard quantiles used in stats, then you can use:

StatsQuantiles [/ALL/BOX/iNaN/IW/TM/Z/Q/QM=method /STBL/TRIM=tValue ] srcWave
The StatsQuantiles operation computes quantiles and elementary univariate statistics for a set of data in srcWave. 

It returns:



If you need just the level at a certain percentage, you could sort your data and then return the value at a desired fraction of the total number of points.