The integer variable k, need to be constrainted to changed less than 5 times during 24 hours. The constraint sum(sub~=0)<=5 is not following CVX style, please help.

```
cvx begin
variable k(24) integer
max/min objective
subject to
-6<=k<=6
initial=0;
sub(1)=k(1)-initial;
for i=2:24
sub(i)=k(i)-k(i-1);
end
sum(sub~=0)<=5
cvx end
```