Column selection in Matlab

Is it possible to select only particular columns of a matrix? E.g. I have a 10x100 shaped matrix and I only would like to get these 4 columns: 231, 82, 12, 493.

Answers


Yes, it is possible. If your matrix is named A then A(:, [3,7,12,89]) will retrieve the columns numbered 3, 7, 12, and 89.


Need Your Help

Display tooltip with correct Time zone using Flot jQuery plugin

jquery timezone plot flot

I have a little problem with the Flot plugin while displaying the xaxis labels in the graph. They are 'mode: "time"'. Currently I use Flot with the tooltip function and the tooltip contains a date ...

Does ARC work with Core Graphics objects?

objective-c ios core-animation core-graphics automatic-ref-counting

I recently started a new project using Automatic Reference Counting (ARC).