Should sympref Change the Behavior of rectangularPulse()?
조회 수: 1 (최근 30일)
이전 댓글 표시
- If x = a or x = b and a <> b, then the rectangular pulse function equals 1/2.
Verify this statement:
rectangularPulse(0,1,[0 1])
syms t real
h(t) = heaviside(t) - heaviside(t-1);
h([0 1])
But changing the sympref for HeavisideAtOrigin yields:
sympref('HeavisideAtOrigin',sym(1));
rectangularPulse(0,1,[0 1])
h([0 1])
So rectangularPulse appears to not be the difference between heavisides. But the sympref('HeavisideAtOrigin') does impact the edge values of rectangularPulse. Is this expected behavior and a deficiency in the documentation?
댓글 수: 2
Walter Roberson
2021년 8월 1일
By the way, you can see the actual code by using
regexprep(char(evalin(symengine, 'expose(rectangularPulse)')),'\\n','\n')
but it is not straight forward.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!