general/tools/misc/
average_hist.pro
FUNCTION average_hist(d,x [,STDEV=stdev]) returns the average of d binned according to x See "HISTBINS" for a description of keywords USAGE: assuming: x = randomu(seed,1000)*10 y = 10-.1*x^2 + randomn(seed,1000) d = y avg = average_hist(d,x,xbins=xc) avg = average_hist(d,x,xbins=xc,range=[2,8],binsize=.25) plot,x,y,psym=3 oplot,xc,avg,psym=-4 NOTE: d can be an array of structures: d=replicate({x:0.,y:0.},1000) d.x = x d.y = y plot,d.x,d.y,psym=3 avg = average_hist(d,d.x) oplot,avg.x,avg.y,psym=-4
Routines
top source average_hist
result = average_hist(a, x, stdev=stdev, log=log, range=range, binsize=binsize, nbins=nbins, xbins=xbins, binval=binval, minimum=minimum, shift=shift, nan=nan, histogram=histogram, reverse=reverse)
Parameters
- a
- x
Keywords
- stdev
- log
- range
- binsize
- nbins
- xbins
- binval
- minimum
- shift
- nan
- histogram
- reverse
File attributes
Modification date: | Fri Nov 21 06:43:16 2014 |
Lines: | 30 |