PRACTICE

VECTOR WITH SPECIFIC VALUES

COLON OPERATOR = VECTOR:RANGE

LINSPACE (lower limit, upper limit, total number of elements)


CALLING ELEMENTS IN A VECTOR(r)


ZEROS()


TRANSPOSING VECTORS ‘

MATRIX(r,c)


INPUTTING VECTORS

OUTPUTTING VECTORS

THEORY

MATLAB’s indexes vectors starts with index 1

MATLAB AUTOMATICALLY EXTENDING

When you create a vector

v = [1 2 3 4 5]

v =

1 2 3 4 5

and when you input a value into an element passed the initially set number of elements.

The elements in between the previous last element and the new element are automatically set to 0

v(7) = 7

v =

1 2 3 4 5 0 7