data: apply(matrix, makelist(makelist(random(100), 20), 20))$ find_value(a, x) := block( [p, q], [p, q]: matrix_size(a), catch( for i thru p do for j thru q do if a[i, j] = x then throw([i, j]), 'not\ found ) )$ find_value(data, 100); not found