Question: Please write in Matlab program. my_reshape Write a function my_reshape that returns a m x n matrix B, whose elements are taken columnwise from row

Please write in Matlab program.
my_reshape Write a function my_reshape that returns a m x n matrix B, whose elements are taken columnwise from row vector A of length m xn For example if, A [146378] and m 2, and n = 3, then Your function must return -1 if A does not havem x n elements. Following is the signature of the function function B-my_reshape (A,m,n) Inputs: A- a row vector of length m x n Output B- a matrix of size m x n Note: This function must use loops rather than MATLAB built-in functions such as reshape, fliplr, flipud. Code to call your function 1 A [1 4 6 3 7 81 2 m 2; B-my-reshape (A , m , n) 5 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
