Clear Filters
Clear Filters

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 view (last 30 days)
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)

Accepted Answer

James Tursa
James Tursa on 4 Mar 2015
Edited: James Tursa on 4 Mar 2015
% B(2:2:end) % NO
EDIT:
find(mod(B,2)==0)
  3 Comments

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!