How do I create conditional statements in Symbolic Math Toolbox 3.1.3 (R14 SP3)?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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'.
Risposta accettata
MathWorks Support Team
il 27 Giu 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!