I have the following code in a program:
Works quite nice. It finds the maximum value for Z. INDEX is correct as is the MAX value.
I would like to follow up with something as follows:
COMMENT/REPT,"The max is at FeatID and the value is " + MAXARR
I know where the max is (at INDEX number MAXATINDEX). It gives me an INTEGER like 4 . How can I interrogate the array so I can create a variable that has the FeatureID or name at that array location?
The following works:
COMMENT/REPT,"The max is at "+MAXATINDEX+" and the value is " + MAXARR
But it reads:
The max is at 4 and the value is -68.34589
I would want it to say:
The max is at PNT4PLANETOP and the value is -68.34589
That would be a whole lot easier to read.
I have a lot of these planes (constructed from individual vector points) that I want to output only the max and the min value. But I do like to know which point it is. So can I get to the name of that feature???
Any words of wisdom anybody?????
Thanks, Jan.
Code:
ASSIGN/NEWARR = ARRAY(PNT1PLANETOP.Z,PNT2PLANETOP.Z,PNT3PLANETOP.Z,PNT4PLANETOP.Z,PNT5PLANETOP.Z,PNT6PLANETOP.Z,PNT7PLANETOP.Z,PNT8PLANETOP.Z,PNT9PLANETOP.Z) ASSIGN/MAXATINDEX = MAXINDEX(NEWARR) ASSIGN/MAXARR = MAX(NEWARR)
I would like to follow up with something as follows:
COMMENT/REPT,"The max is at FeatID and the value is " + MAXARR
I know where the max is (at INDEX number MAXATINDEX). It gives me an INTEGER like 4 . How can I interrogate the array so I can create a variable that has the FeatureID or name at that array location?
The following works:
COMMENT/REPT,"The max is at "+MAXATINDEX+" and the value is " + MAXARR
But it reads:
The max is at 4 and the value is -68.34589
I would want it to say:
The max is at PNT4PLANETOP and the value is -68.34589
That would be a whole lot easier to read.
I have a lot of these planes (constructed from individual vector points) that I want to output only the max and the min value. But I do like to know which point it is. So can I get to the name of that feature???
Any words of wisdom anybody?????
Thanks, Jan.
Comment