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

3 vues (au cours des 30 derniers jours)
Tao
Tao le 3 Juin 2015
Commenté : Tao le 3 Juin 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.

Réponses (1)

Walter Roberson
Walter Roberson le 3 Juin 2015
X * Heaviside(X) is 0 if x is negative
  1 commentaire
Tao
Tao le 3 Juin 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).

Connectez-vous pour commenter.

Catégories

En savoir plus sur Symbolic Math Toolbox 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!

Translated by