creating column vectorsone way to generate a


Creating Column Vectors:

One way to generate a column vector is by explicitly putting the values in square brackets, separated by the semicolons:

>> c = [1; 2; 3; 4]

c =

1

2

3

4

There is no other direct way to use the colon operator to get a column vector. Though, any row vector generated using any of these methods can be transposed to get a column vector. In common, the transpose of a matrix is a new matrix in which the rows and columns are interchanged.

For vectors, transposing a row vector results in a column vector, and transposing the column vector results in a row vector. The MATLAB has a built-in operator, the apostrophe, to obtain a transpose.

>> r = 1:3;

>> c = r

c =

1

2

3

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: creating column vectorsone way to generate a
Reference No:- TGS0174720

Expected delivery within 24 Hours