MATLAB: I want to access every nth value of a large matrix. How to do that

matrix

I require a matlab code for resultant matrix obtained by picking every 9th element of a very large matrix. How can I do that?

Best Answer

Where M is your matrix, using simple subscript indexing:
M(1:9:end,1:9:end)
Or using linear indexing (not likely that you want this, but worth mentioning):
M(1:9:end)
Related Question