Absolute Value in optimization expression
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can I add an absolute value to an optimization expression I am trying to optimize? MATLAB shows the following error :
Undefined function 'abs' for input arguments of type 'optim.problemdef.OptimizationExpression'.
problem is :
minimize abs ( ax + by + cz - d )
subject to , x,y,z are integers in some range
0 commentaires
Réponses (2)
Sean de Wolski
le 1 Fév 2019
Modifié(e) : Sean de Wolski
le 1 Fév 2019
Square it instead so as to not introduce a discontinuity
(expr).^2
0 commentaires
Voir également
Catégories
En savoir plus sur Problem-Based Optimization Setup dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!