Hi,

I’m working on model that is related to my previous post.

A slight modification is applied as:

```
variable a(N);
variable p(N, M);
expression b(N)
obj = obj + a * Constant;
min(obj);
subject to
for i = 1:N
b(i) = sum(p(i));
end
for i = 1:length(list)
b(list(i)) = max(b(list(i)), 1e-3);
end
p>=0;
non-zero_threshold*a <= b <= U.*a;
```

As in the model, I’d like to modify some values that is indexed by a provided list. If the values <= 1e-3, then it will be set to 1e-3. For example, if provided a list like [2, 3, 5], if b(2), b(3), or b(5) is zero, then they will be set to 1e-3.

However, I got an error showing that:

`b>=non-zero_threshold*a - error: {convex}>={real affine}`

**sometimes**.

As described in here, I think that the max() function should be convex, and thus the problem should also be convex, but sometimes things go wrong and sometimes it works well.

Am I missing something or misunderstand the usage of the max() function in cvx?

Thank you in advance!