Suppose you have a 251x150 double matrix A
and you want to extract the 100th column and save it to a new variable B
.
You can do this by indexing the matrix:
main.m14 chars2 lines
Here, :
denotes all the rows, and 100
denotes the 100th column.
Now, B
contains a 251x1 column vector with the values of the 100th column of A
.
gistlibby LogSnag