Defining Dirac Function matlab

5 次查看(过去 30 天)
x(t) = t(u(t + 2) − 3 u(t − 3) + 2 u(t − 5))
How can I plot this function, with u as the diriac and t as a variable?
  2 个评论
Walter Roberson
Walter Roberson 2017-3-2
It seems much more likely to me that you want Heaviside rather dirac.
Rik
Rik 2017-3-2
I agree with Walter. If so, you could implement the Heaviside function (if there is not already an implementation built in) with something like (x+abs(x))/2

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2017-3-2
heaviside exists in the Symbolic Math toolbox. Please be careful about the value of heavside(0); since R2015a you have been able to configure that value using sympref()
dirac exists in the Symbolic Math toolbox as well. Please remember that dirac() is technically a distribution, and that dirac(x) is 0 for all non-0 x and is infinite for x == 0, so multiplying dirac(x) by a constant only makes sense if you are integrating a function that contains dirac() (in which case you get the heaviside step function.)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by