Question: lete the implementation of the selectColumns function, which selects the contents of several columns from a matrix, A. The matrix will be supplied to the

lete the implementation of the selectColumns function, which selects the contents of several columns from a matrix, A. The matrix will be supplied to the function as an put variable. The function should return a matrix B, which contains every eighth column of A. The first column of your result should be column 8 of A. Input variable A- A matrix, the number of columns of which are guaranteed to be an even multiple of 8 This means you do not need to take any special precautions about the dimensions of A. Keep your solution simple. Output variables: B- A matrix containing every eighth column of A. Function Template function B selectColumns ( A end Hints: 1. Matrix indexing will be useful in solving this exercise. Information can be found in sections 9.3 and 9.4 of the Introduction to Programming in MATLAB document on Blackboard. Submitted file: function B selec tColumns ( A ) B= []; Activa end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
