MATLAB: If function for matrix

MATLABmatrix

hi there
i need to do this if function
if a <= b
c = 1
else
c = realmin
but, a and b is a matrix (30×30)
and apparently i got only 1 value of c,
i want a the if function compare every cell of matrix a and b,
and gives me value in 30×30 matrix too
please help, thank you

Best Answer

idx=a<b
c(idx)=1
c(~idx)=realmin