MATLAB: How to get coordinates of number in a matrix

MATLABmatrix

Hello. I'd like to get x and y coordinates of number in matrix:
00000
00100
00000
Number = 1
x = 3
y = 2
Thanks.

Best Answer

a =[0 0 0 0 0
0 0 1 0 0
0 0 0 0 0];
[y,x] = find(a)