HistogramCreate(histogram_id : lpHistogramID);
lpHistogramIDPast:=lpHistogramID;
!Erase previous histograms:
while lpHistogramIDPast>1 do
HistogramDelete(lpHistogramIDPast);
lpHistogramIDPast-=1;
endwhile;
!sDataParaHistograma is the size of elements you have data for, the number of observations (x)
HistogramCreate(
histogram_id : lpHistogramID,
sample_buffer_size: card(sDataParaHistograma)*2);
!pEstDispersionConMedia is the value (y) of each iPoint (x)
For iPoint in sDataParaHistograma do
HistogramAddObservation(histogram_id : lpHistogramID,value : pEstDispersionConMedia(iPoint))
endfor;
!Define the minimum, the maximum, the interval-size and the width of each interval (this is an example)
if not p01DoubleIntervals then lpHistWidth:=0.01 else lpHistWidth:=0.005 endif;
lpHistMin:=-pHistLimites;
lpHistIntervals:=pHistLimites*2/lpHistWidth*0.01;
lpHistMax:=lpHistMin+lpHistWidth*(lpHistIntervals);
!define a set that has as elements the points in your x-domain in the histogram (example)
sHistograma:=ElementRange(lpHistMin*1000,lpHistMax*1000,lpHistWidth*1000);
!configure the histogram with the previously defined elements
HistogramSetDomain(lpHistogramID,width:lpHistWidth,left:lpHistMin, intervals:lpHistIntervals-1);
!get the values of each point y in the x-domain of the histogram (pHistogramaResultado has as index domain iHist in sHistograma).
HistogramGetFrequencies(histogram_id :lpHistogramID ,frequencies :pHistogramaResultado )
Bernie--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aimms+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.