Assuming you have an array A
in MATLAB, and you want to display a specific column of that array, you can use the following syntax:
main.m10 chars2 lines
Here col
is the index of the column you want to display. The :
before col
indicates that we want to select all rows in that column.
For example, if A
is a 2D array with 5 rows and 3 columns, and you want to display the second column:
main.m66 chars4 lines
This will output:
main.m41 chars7 lines
Alternatively, you can also use the disp
function to display the column, like this:
main.m16 chars2 lines
This will give you the same result.
gistlibby LogSnag