フィルターのクリア

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 件のコメント
James Tursa
James Tursa 2015 年 3 月 4 日
編集済み: James Tursa 2015 年 3 月 4 日
Sorry ... I misread your intent. Answer edited.
Alex Degaga
Alex Degaga 2015 年 3 月 4 日
i think your first answer is correct!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by