# Position in matrix without using findall

**URL:** <https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451>\
**Category:** General Usage\
**Created:** [November 18, 2022, 1:35pm UTC](https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451 "2022-11-18T13:35:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amar.korvac](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@amar.korvac](https://discourse.julialang.org/u/amar.korvac)\
**Post date:** [November 18, 2022, 1:35pm UTC](https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451/1 "2022-11-18T13:35:01Z")

</div>

Hello people,  
I need help. I don’t know how to find position of non-zero elements in matrix , but without using findall.  
I know only with findall.😂

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [November 18, 2022, 2:03pm UTC](https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451/2 "2022-11-18T14:03:53Z")

</div>

XY: What’s wrong with findall?

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [November 18, 2022, 2:15pm UTC](https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451/3 "2022-11-18T14:15:28Z")

</div>

You can write a loop to solve this problem, looking at each position of the matrix and checking whether it’s zero or not, saving each index where the comparison is false.

If this is for a course, be sure to check with your lecturer/professor whether external help is allowed.
