フィルターのクリア

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 件のコメント
Birdman
Birdman 2018 年 2 月 24 日
Oh yes I did not read that carefully. Then, ismembertol should do it.
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 Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by