![]() This is known as the Hermitian transpose as shown in the lectures. If C had been complex, the apostrophe would have given complex conjugate values for the transpose. The apostrophe on its own actually gives the complex conjugate transpose (i.e., it changes the sign of all imaginary parts at the same time as transposing the matrix). Matrices in MATLAB can be manipulated in many ways.įor one, you can transpose a matrix using the apostrophe ' (or prime): Of elements is separated by a semicolon to distinguish the different ![]() Į = 0.3333 0.5000 0.6000 0.6667 0.7143 0.7500 0.8182 0.8000 0.7778įrom the previous section, it will be understood that the following matrix B is aģx4 matrix because it has 3 rows and 4 columns.Įntering matrices into MATLAB is similar to entering a vector, except each row We can also do an elementwise division of the vectors using the. ![]() We can also do an elementwise multiplication of the vectors using the. Subtraction of vectors of the same length works exactly the same way. If the two vectors are the same length, it is easy. Now, suppose you would like to add two vectors together. Manipulating vectors is almost as easy as creating them.įirst, suppose you would like to add 2 to each of the elements in vector a. Let's say you want to create a vector with elements between 0 and 20 evenly spaced in increments of 2 (this method is frequently used to create a time vector): (separated by a space) between brackets, and set it equal to a value as shown Let's begin by creating this vector in MATLAB. This tutorial is aimed at giving you an introduction to creating vectors andįrom the previous section, you will be aware that a vector is a 1xN or Nx1 matrix. Vectors and Matrices Vectors and Matrices
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |