You can take the second column of a matrix "A" in MATLAB using the colon operator with the index of the second column enclosed in square brackets. Here is an example:
main.m50 chars3 lines
The output will be:
main.m37 chars6 lines
In this example, :
means all the rows of matrix A
, and 2
means the second column of A
.
gistlibby LogSnag