Question: % for the testing purpose, we will now regenerate the n*m matrix A with n>=4 adn m>=4 using random number to prevent hard coded solution

% for the testing purpose, we will now regenerate the n*m matrix A with n>=4 adn m>=4 using random number to prevent hard coded solution
n = randi([4 8]) % Random row number for A matrix between 4 to 8
m = randi([4 8]) % Random colum number for A matrix between 4 to 8
A = randi([-10 20], n, m) % random A matrix of size n*m with the numbers between -10 to 20.
%Create a n x 2 array B consisting of all elements in the first through second columns of A.
B=0
%Create a 3x 2 array D consisting of all elements in the first three rows and the last last two columns of A.
D=0
%$Find the maximum values in each column of A.
maximumCol=0
%Find the minimum values in each row of A.
minimumRow=0
%Find the maximum values in A.
maxA=0
Write a MATLAB program that will Type the following array and use MATLAB commands to answer the following questions 3 7 -4 12 10 2 - 5 9 A= 6 13 8 11 15 5 4 1 For testing purpose, we will regenerate the n*m matrix A with n>=4 adn m>=4 using random number Create a n x 2 array B consisting of all elements in the first through second columns of A. Create a 3x 2 array D consisting of all elements in the first three rows and the last last two columns of A. Find the maximum values in each column of A. Find the minimum values in each row of A. . Find the maximum values in A
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
