필터 지우기
필터 지우기

check values of all elements of an array

조회 수: 7 (최근 30일)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019년 9월 6일
편집: Zeynab Mousavikhamene 2019년 9월 6일
I have array which has multiple elements. I want to find the elements that are larger than 1 and put the value with the index of the element in a new array.
I need to know whether it was elemet 10 or 12 that the value was larger than one and what was the value.
I need to avoid loop as much as possible. What would be the shortest way?

답변 (1개)

madhan ravi
madhan ravi 2019년 9월 6일
Use find() , logical operators also use ismember() to know the existence of those numbers.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by