Absolute Value in optimization expression
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Sean de Wolski
el 1 de Feb. de 2019
Editada: Sean de Wolski
el 1 de Feb. de 2019
Square it instead so as to not introduce a discontinuity
(expr).^2
0 comentarios
Ver también
Categorías
Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!