I got the error that 'Conversion to logical from optim.problemdef.OptimizationConstraint is not possible.' when I am trying to use the mixed integer optimization. Though I have seen some answers of the similar questions, I still have problems with my code. I have variables ll and ul which are single integers, eg. ll=12, ul=17. And I have a function v(:,j) that is related to the two variables. The function is
I do not understand your formulation. You have ll and ul as optimization variables, which is why you are getting the complaints that conversion of an optimization constraint to logical is not possible.