comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » 2D Histogram error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 2D Histogram error [message #94296 is a reply to message #94293] Fri, 31 March 2017 07:21 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
You need at least a 2 elements array to obtain a histogram.

IDL> print,hist_2d(-1,-1)
% HISTOGRAM: Expression must be an array in this context: H.
% Execution halted at: $MAIN$


So don't call hist_2d() unless you have at least 2 elements. --Wayne

if N_elements(index) GE 2 then begin

qdph=hist_2d(data(index).detx,data(index).dety,MAX1=63,MAX2= 63,MIN1=0,MIN2=0)
dph[quad,ebin,*,*]=qdp

endif
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: =?UTF-8?B?UmU6INis2K/ZiNmEINin2YXYqtit2KfZhtin2Kog2KfZhNir2KfZhtmI2YrYqSDYp9mE?= عامة المعدل الجديد لعام 2017
Next Topic: estimation matrix elements in a vector

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:23:07 PDT 2025

Total time taken to generate the page: 0.00173 seconds