How do you extract odd columns and odd rows from an nxn matrix?

16 次查看(过去 30 天)
without using loops I have to extract odd columns and rows from an nxn matrix

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2014-1-15
r= A(1:2:end,:)
c=A(:,1:2:end)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by