Symbolic toolbox doesn't work with abs() and max()?

4 visualizaciones (últimos 30 días)
Tao
Tao el 3 de Jun. de 2015
Comentada: Tao el 3 de Jun. de 2015
I am using fmincon dealing with a nonlinear constraint optimization problem, one function contain abs(a) and another function contains max(Z, 0), both "a" and "Z" are scalar values. I want to create symbolic Jacobians for my constraint function to fmincon to make the whole algorithm more robust and faster, but it shows these "abs()" and "max()" cannot be used in symbolic toolbox. I used "max(Z, 0)" because one of the function is not defined and not physically meaningful once its value becomes negative.
Thanks a lot for helping.

Respuestas (1)

Walter Roberson
Walter Roberson el 3 de Jun. de 2015
X * Heaviside(X) is 0 if x is negative
  1 comentario
Tao
Tao el 3 de Jun. de 2015
Thank you for your reply. I tried to modify my code this way, but MATLAB works very very very slow to generate the symbolic things (actually unsuccessful).

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox 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!

Translated by