I want to access every nth value of a large matrix. How can I do that?

15 次查看(过去 30 天)
I require a matlab code for resultant matrix obtained by picking every 9th element of a very large matrix. How can I do that?

采纳的回答

Stephen23
Stephen23 2017-7-21
编辑:Stephen23 2017-7-21
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by