MATLAB: Matrix

matix

if i want to find the index of certain value in 2D matrix, how can I find that? e.g: I have a 300×300 matrix. There is a value 90096 in that matriz. I want to find its index. Please show me the code.

Best Answer

A =[ 191 23 37 34 154
212 66 228 99 9
30 128 224 215 199
214 225 114 186 219
148 226 188 225 159];
a = 224;
[i1,j1] = find(abs(A-a) < 100*eps);