Matlab make vector into matrix

broken image

PLOT ( Y ) plots the columns of Y versus their index. If X is a scalar and Y is a vector, length ( Y ) disconnected points are plotted. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up.

broken image

PLOT ( X, Y ) plots vector Y versus vector X. > plot ( x, y ) > plot ( x, y, 'rx' ) > help plot PLOT Linear plot. We willĭefine two vectors and add and subtract them:

broken image

Notation is the same as found in most linear algebra texts. Operations can be defined with little effort.įirst, we will look at simple addition and subtraction of vectors. Shown, they are put together to demonstrate how relatively complex In this tutorial we will first demonstrate simple manipulations suchĪs addition, subtraction, and multiplication. Vectors ( Introduction to Vectors in Matlab) or matrices ( Introduction to Matrices in Matlab). For more information on those topics see our tutorial on either Know how to create vectors and matrices and know how to index into Here we assume that you know the basics of defining and Matlab is the ease in which you can manipulate your vectors and

broken image

Matlab makes it easy to create vectors and matrices.

broken image