6 Creating vectors
Edit your newly script so that it performs the following steps in order:
- Creates a row vector named
v1
having the values 1, 3, 10. - Creates a row vector named
v2
having the values -2, -1, 0, 1, 2, 3. Use the colon:
operator to create the vector. - Creates a row vector named
v3
having the values 0, 4, 8, 12, 16. Use the colon:
operator to create the vector. - Creates a row vector named
v4
having a first element with the value 0, the last element having the value2 * pi
, and having 25 equally spaced elements in total. Use the functionlinspace
to create the vector. - Creates a column vector named
c1
having the values 2, 5, 8. - Creates a column vector named
c2
having the values 3, 4, 5, 6, 7. Use the colon:
operator to create the vector. - Creates a column vector named
c3
having the values 5, 10, 15, 20, 25, 30. Use the colon:
operator to create the vector.