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

5 ビュー (過去 30 日間)
Chandvi Arora
Chandvi Arora 2017 年 7 月 21 日
編集済み: Stephen23 2017 年 7 月 21 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by