Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help!!!!!!!! LU QUI Write a function with the header line [M, mi, mj] = mymin(x) where the input X is a matrix of any

image text in transcribed
please help!!!!!!!!
LU QUI Write a function with the header line [M, mi, mj] = mymin(x) where the input X is a matrix of any size. Your function should output M, the minimum value in that matrix, mi, the row index of the minimum value, and mj, the column index of the minimum value. Your function must find the minimum value in the matrix, X, and output that value in M along with the corresponding row (mi) and column (mj). The only built in MATLAB functions you can use are size(), length(), if, for, while, and end. You cannot use min(), max(), sort ), find ) or any other MATLAB function. If you have a question about this, please ask If there is a duplicate minimum number-your function should display the row and column of the first time that number appears (see second example below) Test your function in the command window >>[M, mi, mi - mymin([1, 4, 5; 18, 2, 3; 0, 4, 5]) M = 0 mi - 3 my - 1 >> [M, mi, mj] = mymin((1. 4. 5; 18, 2, 3; 10, 4, 5; 10, 1, 101) M1 mi - 1 my - 1 unat natuur rode to work in the time even write as much of the code as you can to

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

explain what is meant by redundancy

Answered: 1 week ago