You can create a column vector containing values of the first column of a matrix A
by indexing it as A(:,1)
. For example, suppose A
is a matrix of size [3 2]
with the following elements:
main.m28 chars4 lines
To create a column vector containing the values of the first column of A
, you can use the command:
main.m11 chars2 lines
This will create a column vector t
of size [3 1]
with the following elements:
main.m22 chars4 lines
gistlibby LogSnag