Question: MATLAB You will write a function that will load the function and analyze the data. The instructor's function will generate a matrix with random dimensions.You
MATLAB
You will write a function that will load the function and analyze the data.
The instructor's function will generate a matrix with random dimensions.You will create a matrix with the same dimensions as the one I create. This function will be called chkoutput and passed as an output. To loop through the data and check it for the following conditions, you must use a nested for loop. If the number is greater than the matrix's mean, the value of chkoutput must be set to 8. If the number is less than the matrix's median, the value of chkoutput must be set to 3.
that's what I've done so far
\begin{tabular}{r|l} 1 & function [chkoutput] = untitled2() \\ 2 & \%loads in code given by instructor \\ 3 \\ 4 & [matrix,mean,median] = data g(; \\ 5 & chkoutput= size(matrix); \\ 6 & for i=1 \\ 7 & for j=1 \\ 8 \\ 10 \\ 11 & if mod(chkoutput (i,j),mean) =5 \\ 12 & end \\ end \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
