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!

2 commentaires

KALYAN ACHARJYA
KALYAN ACHARJYA le 22 Nov 2020
Modifié(e) : KALYAN ACHARJYA le 22 Nov 2020
Please do read here Foundation MATLAB
Stephen23
Stephen23 le 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!

Connectez-vous pour commenter.

Réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by