Find maximum element along with its index in Julia - findmax() Method Last Updated : 26 Mar, 2020 Comments Improve Suggest changes Like Article Like Report The findmax() is an inbuilt function in julia which is used to return the maximum element of the specified collection along with its index. If there are multiple maximal elements are present in the collection, then the first one will be returned. If there is any data element is NaN, this element is returned. Syntax: findmax(itr) or findmax(A; dims) Parameters: itr: Specified collection of elements. A: Specified array. dims: Specified dimension. Returns: It returns the maximum elements with their corresponding index. Example 1: Python # Julia program to illustrate # the use of findmax() method # Getting the maximum elements # with their corresponding index. println(findmax([1, 2, 3, 4])) println(findmax([5, 0, false, 6])) println(findmax([1, 2, 3, true])) println(findmax([5, 0, NaN, 6])) println(findmax([1, 2, 3, 3])) Output: Example 2: Python # Julia program to illustrate # the use of findmax() method # Getting the value and index of # the maximum over the given dimensions A = [5 10; 15 20]; println(findmax(A, dims = 1)) println(findmax(A, dims = 2)) Output: Comment More infoAdvertise with us Next Article Find maximum element along with its index in Julia - findmax() Method K Kanchan_Ray Follow Improve Article Tags : Julia Similar Reads Getting minimum element along with its index in Julia - findmin() Method The findmin() is an inbuilt function in julia which is used to return the minimum element of the specified collection along with its index. If there are multiple minimal elements are present in the collection, then the first one will be returned. If there is any data element is NaN, this element is 1 min read Accessing element at a specific index in Julia - getindex() Method The getindex() is an inbuilt function in julia which is used to construct array of the specified type. This function is also used to get the element of the array at a specific index. Syntax: getindex(type, elements...])Parameters:  type: Specified type.elements: Specified list of elements. Returns 2 min read Getting maximum elements in Julia - maximum() and maximum!() Methods The maximum() is an inbuilt function in julia which is used to return maximum elements in different scenario. Syntax: maximum(f, itr) or maximum(itr) or maximum(A::AbstractArray; dims) Parameters: f: Specified function.itr: Specified list of elements.A::AbstractArray: Specified array of different d 2 min read Getting first element of an array in Julia - first() Method The first() is an inbuilt function in julia which is used to return the first element of the specified iterable collection. Syntax: first(coll) Parameters: coll: Specified iterable collection. Returns: It returns the first element of the specified iterable collection. Example 1: Python # Julia progr 1 min read Getting first index of a collection in Julia - firstindex() Methods The firstindex() is an inbuilt function in julia which is used to return the first index of the specified collection. If a dimension d is given, return the first index of collection along dimension d. Syntax: firstindex(collection) or firstindex(collection, d) Parameters: collection: Specified colle 1 min read Like