Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Locate_matrix_entry

Function: locate_matrix_entry (<M>, <r_1>, <c_1>, <r_2>, <c_2>, <f>, <rel>) The first argument must be a matrix; the arguments <r_1> through <c_2> determine a sub-matrix of <M> that consists of rows <r_1> through <r_2> and columns <c_1> through <c_2>.

Find a entry in the sub-matrix <M> that satisfies some property. Three cases:

(1) `<rel> = `bool and <f> a predicate:

Scan the sub-matrix from left to right then top to bottom, and return the index of the first entry that satisfies the predicate <f>. If no matrix entry satisfies <f>, return `false`.

(2) `<rel> = `max and <f> real-valued:

Scan the sub-matrix looking for an entry that maximizes <f>. Return the index of a maximizing entry.

(3) `<rel> = `min and <f> real-valued:

Scan the sub-matrix looking for an entry that minimizes <f>. Return the index of a minimizing entry.

```(%o1)                                true
(%i2) ```

### Related Examples

##### locate_matrix_entry

? locate_matrix_entry;

Calculate

##### locate_matrix_entry

? locate_matrix_entry ;

Calculate

##### locate_matrix_entry

? locate_matrix_entry;

Calculate

##### locate_matrix_entry

? locate_matrix_entry ;

Calculate 