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

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 11월 22일
편집: KALYAN ACHARJYA 2020년 11월 22일
Please do read here Foundation MATLAB
Stephen23
Stephen23 2020년 11월 22일
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!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

질문:

2020년 11월 22일

댓글:

2020년 11월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by