dashdot c cyan + plus - dashed m magenta * star y yellow s square k black d diamond v triangle ( down ) point - solid g green o circle : dotted r red x x - mark. Various line types, plot symbols and colors may be obtained with PLOT ( X, Y, S ) where S is a character string made from one element from any or all the following 3 columns : b blue. In all other uses of PLOT, the imaginary part is ignored. If Y is complex, PLOT ( Y ) is equivalent to PLOT ( real ( Y ), imag ( Y )). 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. 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: 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
#Matlab create symbolic vector how to
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 Matlab makes it easy to create vectors and matrices.