## File: Finding-maximum-and-minimum-elements-of-matrices.html

package info (click to toggle)
gsl-ref-html 2.3-1
• area: non-free
• in suites: bullseye, buster, sid
• size: 6,876 kB
• ctags: 4,574
• sloc: makefile: 35
 file content (120 lines) | stat: -rw-r--r-- 6,273 bytes parent folder | download
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120` `````` GNU Scientific Library – Reference Manual: Finding maximum and minimum elements of matrices

Next: , Previous: Matrix operations, Up: Matrices   [Index]

8.4.11 Finding maximum and minimum elements of matrices

The following operations are only defined for real matrices.

Function: double gsl_matrix_max (const gsl_matrix * m)

This function returns the maximum value in the matrix m.

Function: double gsl_matrix_min (const gsl_matrix * m)

This function returns the minimum value in the matrix m.

Function: void gsl_matrix_minmax (const gsl_matrix * m, double * min_out, double * max_out)

This function returns the minimum and maximum values in the matrix m, storing them in min_out and max_out.

Function: void gsl_matrix_max_index (const gsl_matrix * m, size_t * imax, size_t * jmax)

This function returns the indices of the maximum value in the matrix m, storing them in imax and jmax. When there are several equal maximum elements then the first element found is returned, searching in row-major order.

Function: void gsl_matrix_min_index (const gsl_matrix * m, size_t * imin, size_t * jmin)

This function returns the indices of the minimum value in the matrix m, storing them in imin and jmin. When there are several equal minimum elements then the first element found is returned, searching in row-major order.

Function: void gsl_matrix_minmax_index (const gsl_matrix * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax)

This function returns the indices of the minimum and maximum values in the matrix m, storing them in (imin,jmin) and (imax,jmax). When there are several equal minimum or maximum elements then the first elements found are returned, searching in row-major order.

``````