Write a function in MATLAB called stats that accepts an Nx matrix. This function should compute the following for each column and return 5 row vectors – mat_mean, mat_median, mat_min, mat_max and mat_std_dev which contain the mean, the median, the minimum, the maximum and the standard deviation values for each column in the NxN matrix. For example: Test Result A = [1 1 1; 3 4 5; 8 10 12]; [ mean_A median_A min_A max_A std_dev_A] = stats(A); disp(mean_A) 4 5 6 disp(median_A) 3 4 5 disp(min_A) 1 1 disp(max_A) 8 10 disp(std_dev_A) 3.6056 4.5826 5.5678 + Show transcribed image text Write a function in MATLAB called stats that accepts an Nx matrix. This function should compute the following for each column and return 5 row vectors – mat_mean, mat_median, mat_min, mat_max and mat_std_dev which contain the mean, the median, the minimum, the maximum and the standard deviation values for each column in the NxN matrix. For example: Test Result A = [1 1 1; 3 4 5; 8 10 12]; [ mean_A median_A min_A max_A std_dev_A] = stats(A); disp(mean_A) 4 5 6 disp(median_A) 3 4 5 disp(min_A) 1 1 disp(max_A) 8 10 disp(std_dev_A) 3.6056 4.5826 5.5678 +
Expert Answer
Answer to Write a function in MATLAB called stats that accepts an Nx matrix. This function should compute the following for each c…