You are on page 1of 1

Week 3 (Introduction to Matrices and Arrays)

 Array – any set of numbers arranged in a rectangular pattern


 Matrix – 2 dimensional array
 Vector – 1 dimensional array
 Note we always say rows before column, (row,column).

[ ]--- denotes a vector in matlab


[ ; ] – semicolunm denotes end of row, hence it is a matrix
[ : ] – states you begin with first enrty, increment the middle entry, and stop at last
entry which is maximum. Fast way to make large vectors with equal spaces] Note
you always get a row vector

Functions
Sqrt – ---- square root
Sin ---- sine of radiance
Sind ---- sine of degrees
Size --- tells you the dimension of the matrix

X(row,colum) ---- calls element of matrix

Subarray operators --- calls a part of the matrix X(2,[1,3]) gives you second row and
1 and 3 colum

You might also like