MATLAB: While using Fmincon and obtaining unknown values is it possible to apply equality constraints for only 3rd and 4th element of the array and not the whole array containing 5 elements

fminconMATLABmatrix manipulation

is it possible to minimize this fuction with the following constraints
Function : X(1)^1+X(2)^0.5+X(3)^4+X(4)^0.12+X(5)^-1
Constraints : X(3)=0 , X(4)=0 , X(2)<3

Best Answer

  • Use the lb and ub constraints. Set lb equal to ub equal to 0 for positions 3 and 4. Set ub location 2 to 3*(1-eps). Set all other lb to -inf and all other ub to +inf