{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


ABCs_arrays - (d Vertically concatenate the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function [A B C D E F G H] = ABCs_arrays(mat1,mat2) % (a) Create an array that has the numbers 1, 2, and 5 in the first row, % and the numbers 9, 11, and 15 in the second. Store your answer in % the variable "A". A = % (b) Create a array of ones that has 5 rows and 10 columns. Store your % answer in a variable called "B". B = % (c) The array "mat1" has been given to you. Find the number of rows % and columns in "mat1", and save your answer in "C" (rows) and "D" % (columns). [C D] =
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % (d) Vertically concatenate the arrays "mat1" and "mat2". Store your % answer in the variable "E". E = % (e) Take the top half of the array stored in the variable % "mat2"- that is, take all of the columns and the first half of the % rows. Store your answer in the variable "F". F = % (f) Transpose "mat2". Save your answer in the variable "G". G = % (g) Linearize "mat1". "mat1" should go from a MxN array to a (M*N)x1 % array. Store your answer in "H". H =...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online