Find first index with odd entry in vector

조회 수: 3 (최근 30일)
Giovanni Rodriguez
Giovanni Rodriguez 2020년 11월 22일
댓글: Stephen23 2020년 11월 22일
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개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by