Reference no: EM132175608
(a) What is the value of y if y=length(linspace(0.1,0.5))? Give a short explanation how you get your answer.
(b) Assume matrix B exists in the workspace containing a number of rows and columns.
i. Write a single MATLAB statement to assign the elements of the last column to variable lastColumn.
ii. Using your answer in part(i) above, write a single MATLAB statement to assign the number of elements in a variable lastColumn to a variable called numElems.
iii. Write a series of MATLAB statements to determine the average of all elements in matrix B which are multiples of 6 (without using loop structures) and assign the answer
to variable avgdiv6.
(c) Write a series of MATLAB statements to determine and display (using fprintf function) how many odd numbers exists in matrix B. Format of display should be:
There are ........odd numbers in matrix B.
(d) Write a series of MATLAB statements to display the elements of column 2 in matrix B in descending order
(e) Write a series of MATLAB statements to calculate how many numbers in matrix B which are between 12 and 65 (all inclusive) and assign the answer to variable numInRange.