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
2017 年 3 月 2 日
It seems much more likely to me that you want Heaviside rather dirac.
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
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.)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Manage Products についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!