scripting histogram

Jean Pierre Arabonis arabonis at EGS.UCT.AC.ZA
Mon Jan 24 16:23:11 EST 2005


Hi all
    I'm back to my histogram plotting and after looking at various
options I returned to the one posted some time back on the list, the
results looked odd, but the method elegant. After taking a deep look at
the results I found a problem that I cannot fathom, a variable is
reassigned and just simply does not get re-assigned, I tried to make the
variable global with no success as well as setting it to a value. Below
is the offending part as well as output that I receive in the console.
    Please help I'm at my wits end.
    Thanks
       Jean Pierre

*******************************************************************************
*********    Main Loop through Variable values and group into bins
while (t<=n)
 'set gxout value'
 'set t 't
 'd 'var
* res=subwrd(result,10)
res=subwrd(result,4)
*say 'value is ' res tested thus far and working

**************   Determine which bin location the data is located
    bin=1
    say 'mint is : ' mint
templ = mint
*temp1 = 2
    tempu=mint+dx

    say 'Variables are : mint: ' mint ' temp1: ' temp1 ' dx: ' dx '
tempu: ' tempu

    while (bin <=nbin)
       say 'old temp1 is : ' temp1 'and dx is : ' dx
       temp1 = temp1+dx
       say 'New temp1 is ' temp1
       tempu=tempu+dx
       say 'temp u is: ' tempu ' value is: ' res
       if (t <2); tval.bin=tempu;endif
       if (res > templ & res < tempu);num.bin=num.bin+1;endif
       bin=bin+1
    endwhile
**************

t=t+1
endwhile

***************

Console Output
mint is the lowest variable value



This may take a moment.
dx or increment is 1.116
mint is : 2
Variables are : mint: 2 temp1: temp1 dx: 1.116 tempu: 3.116
old temp1 is : temp1and dx is : 1.116
Non-numeric args to numeric operation
  Error occurred on line 138
  In file /home/arabonis/pdf2.gs
ga->\\

--
Jean Pierre Arabonis
arabonis at egs.uct.ac.za
Tel 021 780 1021 cell 084 401 1365
This email is 100% Microsoft Free




More information about the gradsusr mailing list