Hello; Given a vector B = [ 8 3 9 4 6 7 7 5 4 5]; How do I call out from B all the even element locations? (Not even numbers, locations)

1 次查看(过去 30 天)
Hello; Given a vector B = [ 8 3 9 4 6 7 7 5 4 5]; How do I call out from B all the even element locations? (Not even numbers, locations)

采纳的回答

James Tursa
James Tursa 2015-3-4
编辑:James Tursa 2015-3-4
% B(2:2:end) % NO
EDIT:
find(mod(B,2)==0)
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by