Write a user-defined function that fmds the largest element of a matrix. For the function name and

Question:

Write a user-defined function that fmds the largest element of a matrix. For the function name and arguments, use [Em, rc] = matrixmax (A), where A is any size matrix. The output argument Em is the value of the largest element, and rc is a two-element vector with the address of the largest element (row and column numbers). If there are two, or more, elements that have the maximum value, the output argument rc is a two-column matrix where the rows list the addresses of the elements. Test the function three times. For input create a 4 × 6 matrix using the following command: x=randi ( [-20 100] ,4,6)
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: