How do I create conditional statements in Symbolic Math Toolbox 3.1.3 (R14 SP3)?

조회 수: 1 (최근 30일)
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'.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
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개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by