how do i extract every 10th column from a matrix

using selectcolumn

1 Comment

@David Craven: what is selectcolumn ?
Why not use very simple and efficient indexing?

Sign in to comment.

Answers (1)

I can’t find a ‘selectcolumn’ function in the online documentation or the File Exchange.
If ‘M’ is your matrix, either:
Out = M(:,[1 10:10:end]);
or:
Out = M(:,1:10:end);
depending on how you define ‘every 10th column’.

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 5 Sep 2017

Commented:

on 5 Sep 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!