Functions > Vector and Matrix > Array Characteristics > Example: Finding Minima and Maxima of an Array
Example: Finding Minima and Maxima of an Array
1. Define a vector where one of its elements is a complex number.
Click to copy this expression
2. Use the IsScalar function to check if the second element of the vector is a scalar.
Click to copy this expression
Complex numbers are considered scalars.
* 
You can use the IsArray function to check if a variable is an array.
Click to copy this expression
3. Use the min function to find the smallest element in the vector.
Click to copy this expression
The min function returns the smallest real number plus the smallest imaginary part. In this case, it returned -2 and an imaginary part of 0.
4. Use max to find the largest element in the vector.
Click to copy this expression
The max built-in function returns the largest real number plus the largest imaginary part.
Was this helpful?