[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
histogram question
- Subject: histogram question
- From: "Gregory Y. Prigozhin" <gyp(at)space.mit.edu>
- Date: Wed, 08 Aug 2001 16:17:51 -0400
- Newsgroups: comp.lang.idl-pvwave
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:26085
Folks,
I am sure this problem must have an elegant solution
that is not obvious to me:
I have an array X. I need to make a histogram and throw away elements
of the array with a high count rate, say with count rate above 5 times
median count rate.
Brute force way is ugly and inefficient when array is not small:
plothist,X,xhist,yhist
bad=xhist[where(yhist gt 5*median(yhist),count)]
if count ne 0 then begin
for ind=0,count-1 do begin
X=X[where(X ne bad[ind])]
endfor
endif
Any suggestions?
Gregory