I have a constraint in my problem that uses `floor`

function on the optimization variable, `x`

(which is a vector), to check if `x`

contains integers or not, as I want only integer solutions.

```
for i=1:n
floor(x(i,1))==x(i,1)
end
```

CVX is not able to handle it and throws the following error:

Undefined function ‘floor’ for input arguments of type ‘cvx’.

How do I overcome this?

The same error is shown when I use the `mod`

or the `rem`

functions:

```
for i=1:n
rem(x(i,1),1)==0
end
```

Undefined function ‘rem’ for input arguments of type ‘cvx’.

```
for i=1:n
mod(x(i,1),2)==0 | mod(x(i,1),2)==1
end
```

Undefined function ‘mod’ for input arguments of type ‘cvx’.