Clicky

Fortran Wiki
maxloc (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #3 to #4: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

Determines the location of the element in the array with the maximum value, or, if the dim argument is supplied, determines the locations of the maximum element along each row of the array in the dim direction. If mask is present, only the elements for which mask is .true. are considered. If more than one element in the array has the maximum value, the location returned is that of the first such element in array element(削除) order. (削除ここまで)(追記) order (追記ここまで)(削除) If (削除ここまで)(追記) if (追記ここまで) the(削除) array (削除ここまで)(削除) has (削除ここまで)(削除) zero (削除ここまで)(削除) size, (削除ここまで)(削除) or (削除ここまで)(削除) all (削除ここまで)(削除) of (削除ここまで)(削除) the (削除ここまで)(削除) elements (削除ここまで)(削除) of (削除ここまで)(追記) back (追記ここまで)(追記) is not present, or if it is false; otherwise, the location returned is that of the first such element. If the array has zero size, or all of the elements of (追記ここまで)mask are .false., then the result is an array of zeroes. Similarly, if dim is supplied and all of the elements of mask along a given row are zero, the result value for that row is zero.

Standard

Fortran 95 and later; array of character and the kind argument are available in Fortran 2003 (追記) and later. The (追記ここまで)(追記) back (追記ここまで)(追記) argument is available in (追記ここまで)(追記) Fortran 2008 (追記ここまで) and later.

Class

Transformational function

Syntax

  • result = maxloc(array, dim [, mask] [,(削除) kind]) (削除ここまで)(追記) kind] (追記ここまで)(追記) [, (追記ここまで)(追記) back]) (追記ここまで)
  • result = maxloc(array [, mask] [,(削除) kind]) (削除ここまで)(追記) kind] (追記ここまで)(追記) [, (追記ここまで)(追記) back]) (追記ここまで)

Arguments

  • array - Shall be an array of type integer, real, or character.
  • dim - (Optional) Shall be a scalar of type integer, with a value between one and the rank of array, inclusive. It may not be an optional dummy argument.
  • mask - Shall be an array of type logical, and conformable with array.
  • kind - (Optional) An integer initialization expression indicating the kind parameter of the result.
  • (追記) (追記ここまで)(追記)
  • back - (Optional) A scalar of type logical.
  • (追記ここまで)

Return value

If dim is absent, the result is a rank-one array with a length equal to the rank of array. If dim is present, the result is an array with a rank one less than the rank of array, and a size corresponding to the size of array with the dim dimension removed. If dim is present and array has a rank of one, the result is a scalar. If the optional argument kind is present, the result is an integer of kind kind, otherwise it is of default kind.

See also

max, maxval (追記) , (追記ここまで)(追記) minloc (追記ここまで)

category: intrinsics

Revised on June 5, 2018 15:44:47 by Jason Blevins (128.146.137.91) (2229 characters / 0.0 pages)
Edit | Back in time (3 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, Fortran 2008, max, maxval, minloc, Fortran 95, Fortran 2003 status

AltStyle によって変換されたページ (->オリジナル) /