필터 지우기
필터 지우기

I have a 17658x1 double matrix. I want to find the values of indices when matrix elements are equal to k(here .1).

조회 수: 1 (최근 30일)
I have a 17658x1 double matrix. I want to find the values of indices when matrix elements are equal to k(here .1).

채택된 답변

Birdman
Birdman 2018년 2월 24일
For instance, imagine you want to find 1 in a randomly generated matrix:
A=randi([1 5],17658,1);&demo data
idx=find(A==1);
  댓글 수: 3
Abhishek Maurya
Abhishek Maurya 2018년 2월 25일
편집: Abhishek Maurya 2018년 2월 25일
Thankyou so much. idx=find(A==k); is working properly for floating numbers too, unless the exact value of the number is known like k=3.051757812500000e-05. Thankyou Birdman,Stephen Cobeldick.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by