I get an error where an optimization expression can't evaluate a logical NOT (~). I also tried using functions such as "all()" and "unique()" which also caused errors. Looking at the reference here:
https://www.mathworks.com/help/optim/ug/optim.problemdef.optimizationexpression.html
It appears that optimization expressions can only use very basic arithmatic functions like "sum()" or transposing matrices. What types of functions can be used in optimization expressions outside of these?
Best Answer