minp()

Read(676) Label: sequence, minimum value,

Here’s how to use minp() function.

A .minp()

Description:

Get the member that makes the minimum value for the expression.

Syntax:

A.minp(x)

Note:

The function computes expression x with each member of sequence A and returns the member which makes the minimum value for the expression x

Option:

@1

Return the first member that fulfills the condition.

@a

Return all the members that fulfill the condition. By default, return what @1 gets

@z

Search the member from back to front

Parameter:

A

A sequence

x

The expression to be computed

Return value:

The member which makes the minimum value for the expression x

Example:

 

A

 

1

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

 

2

=A1.minp(~*~)

1, @1 is the default

3

=A1.minp@a(~*~)

[1,1]

4

=A1.minp@z(~*~)

1

5

=A1.minp@az(~*~)

[1,1]

6

=demo.query("select EID,NAME,BIRTHDAY from EMPLOYEE")

 

7

=A6.minp(BIRTHDAY)

Related function:

A.pmin()

A.maxp()