How do I create conditional statements in Symbolic Math Toolbox 3.1.3 (R14 SP3)?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to create a discontinous, conditional, symbolic function in MATLAB. When I try to use > (or <) I get the following error:
??? Function 'gt' is not defined for values of class 'sym'.
Réponse acceptée
MathWorks Support Team
le 27 Juin 2009
The ability to perform conditional operations is not available in Symbolic Math Toolbox 3.1.3 (R14 SP3). Boolean logic is available in the Extended Symbolic Math Toolbox 3.1.3 (R14 SP3).
Conditional operation can be approximated using the Symbolic Math step function, HEAVISIDE. Please note that the HEAVISIDE function returns NaN for heaviside(0), and so the resultant symbolic function is not defined for every value.
0 commentaires
Plus de réponses (0)
Voir également
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!