Question: Problem 1) Given a matrix M (any matrix entries, any size): Given matrix M, whit an even number of columns and any number of rows;

Problem 1) Given a matrix M (any matrix entries, any size): Given matrix M, whit an even number of columns and any number of rows; write a MATLAB function [A]= halfco!zero(M) to: . Make zero the 1st half of the columns of matrix M. * The rest of the entries in the matrix should be squared The resultant matrix is called A. .The original matrix M should be preserved Write non-vectorized and vectorized versions of your function. Non-vectorized versions may need the use of for-loops and the usual programming style that you are familiar with. Vectorized versions of the code involve new MATLAB techniques developed in class. Please watch carefully all MATLAB videos. Problem 1) Given a matrix M (any matrix entries, any size): Given matrix M, whit an even number of columns and any number of rows; write a MATLAB function [A]= halfco!zero(M) to: . Make zero the 1st half of the columns of matrix M. * The rest of the entries in the matrix should be squared The resultant matrix is called A. .The original matrix M should be preserved Write non-vectorized and vectorized versions of your function. Non-vectorized versions may need the use of for-loops and the usual programming style that you are familiar with. Vectorized versions of the code involve new MATLAB techniques developed in class. Please watch carefully all MATLAB videos
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
