MATLAB Answers

Finding location of specific element from a MATRIX returns '0×1 empty double column vector'

25 views (last 30 days)
Zhou Ci
Zhou Ci on 23 Sep 2021 at 7:51
Commented: Zhou Ci on 23 Sep 2021 at 10:14
Hi everyone,
I have a matrix and I'm trying to find location of some specific elements but it gives me no answer. My code:
[i,j] = find(a==23.5975) % it can be clearly seen in the figure that this value is present in the
% 1st row and 3rd column. but it gives the following result.
i =
0×1 empty double column vector
j =
0×1 empty double column vector
I'll be gratefu for any help, thank you.

Accepted Answer

Chunru
Chunru on 23 Sep 2021 at 9:18
[i,j] = find(abs(a-23.5975)<1e-20)
  7 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!