DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

how to return the row number of a channel data point

Hello,

 

I'm new to DIAdem and I'm struggling a little.  I'm trying to do something relatively simple I think but I haven't been able to figure it out.  How do you get the row number of the maximum value in a channel.  I see how to get the maximum value from the maximum channel property.  how do I get the row number?

0 Kudos
Message 1 of 3
(4,314 Views)

Hello chiligog,

 

Here's the code that returns the row number:

 

'Row = PNo(ChNum, CMax(ChNum))
L1 = PNo(2, CMax(2))
msgbox(L1)

 

Function: PNo

Determines the row in a numeric channel or a text channel, of which the contents are closest to a specified value or text.

ReturnValue = PNo(ChannelName,Value)

 

If you have the Crash Analysis Module for DIAdem, there is an easy way with the Min/Max function:

 

minmax.png

 

But since most people don't have that module, the first solution i posted is perfectly capable ...

 

That should do it. Let us know if you have additional question ...

 

     Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 3
(4,311 Views)

yes that was exactly what I was looking for.  thank you

0 Kudos
Message 3 of 3
(4,303 Views)