MATLAB: Finding similar numbers and rounding to integers

convert integer

Suppose I have 8 variables and I want to run an If function if at least two of those variables are equal to one. All variables are real numbers and should be converted to integers meaning 1.8 or 1.2 should be rounded to 1. How can I implement this as a function?
x1=22, x2=3.3, x3=1.2 x4=1 x5=1.7 x6=44 x7=6 x8=4

Best Answer

Completely agree with John. But just in case:
if length(find(fix([x1 x2 x3 x4 x5 x6 x7 x8])==1))>=2
...
condition
...
end