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