pmin()

Read(214) Label: minimum value, position,

Here’s how to use pmin() function.

A.pmin()

Description:

Get the positions of members with the minimum value in a sequence.

Syntax:

A.pmin(x)

Note:

The function computes expression x with each member of sequence A and returns the sequence numbers of the members whose computations are the minimum. Can be used to find the positions of the minimum value in a sequence.

Parameters:

A

A sequence

x

A field name or an expression, in which "~" is used to reference the current record.

Options:

@a

Return one sequence number or multiple ones of the members that make expression x get the smallest value.

@z

Perform the search backwards from the last member; by default perform the search from the first member.

Return value:

A sequence number or a sequence composed of sequence numbers

Example:

 

A

 

1

[2,5,4,3,2,1,4,1,3]

 

2

=A1.pmin(~*~)

6

3

=A1.pmin@a(~*~)

[6,8]

4

=A1.pmin@z(~*~)

8

5

=A1.pmin@az(~*~)

[8,6]

6

=demo.query("select * from EMPLOYEE")

 

7

=A6.pmin(BIRTHDAY)

296

Related functions:

A.minp()

A.pmax()