Find first index with odd entry in vector

2 views (last 30 days)
Giovanni Rodriguez
Giovanni Rodriguez on 22 Nov 2020
Commented: Stephen23 on 22 Nov 2020
Hi,
I am trying write code to find the first odd entry in a vector. Such that:
a = [4 2 5 5 2 1]'
enter magical code here
b = 3
Any help is appreciated!
  2 Comments
Stephen23
Stephen23 on 22 Nov 2020
Original question by Giovanni Rodrigue:
Find first index with odd entry in vector
Hi,
I am trying write code to find the first odd entry in a vector. Such that:
a = [4 2 5 5 2 1]'
enter magical code here
b = 3
Any help is appreciated!

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!