A = randi(99,10,10) % test array
x = 30;
lessthanx = A(A<x) % all the numbers in A that are < x
fprintf('%d',randi(1000,1,1)) % "print another number instead of the number I found"
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!