Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Instructions For each of the problems below create on paper a well detailed algo

ID: 3847342 • Letter: I

Question

Instructions For each of the problems below create on paper a well detailed algorithm. This algorithm should be your own work without relying on any MATLAB built in solutions (obviously fprintf, length, size, etc are needed). Flow chart your algorithm. It must match your algorithm structure Then code your algorithm into MATLAB (comments first, write the steps of your hm. in CO ment and code the step after each step algorit Run your algorithm on 4 good test cases (captured and printed in diary) and then by hand justify and prove why it was a good and useful test case.

Explanation / Answer

function minValue = findMinValue(x)
    [row col] = size(x); %find the size of matrix
    minValue = x(1,1); %let consider first item be minimum
    for i = 1:row %loop over each item of the matrix
        for j = 1:col
            if x(i, j) < minValue %if the current item is less than the minimum
                minValue = x(i, j); %record new minimum
            end
        end
    end
end %when the code ends, minValue is returned

This function in MATLAB meets all your requirment provided by you. I have also commented the code for easy understanding. Incase you are still facing problem with the code, feel free to comment below. I shall be glad to help you with the code as far as possible.