function A = makematbis(v,w) % makematbis - Exercise % MATLAB® - A Practical Introduction to Programming % and Problem Solving - Fifth Edition - Stormy Attaway % p. 156 - n. 29 % Write a function called “makemat” that will receive two row vectors as % input arguments, and from them create and return a matrix with two rows. % You may not assume that the length of the vectors is known. Also, the % vectors may be of different lengths. If that is the case, add 0’s to the % end of one vector first to make it as long as the other. % For example, a call to the function might be: % >>makemat(1:4, 2:7) % ans = % 1 2 3 4 0 0 % 2 3 4 5 6 7 A=[v,zeros(1,numel(w)-numel(v)); w, zeros(1,numel(v)-numel(w))]; end