Bug Plotting Heaviside Step Function
23 次查看(过去 30 天)
显示 更早的评论
I'd expect this:
fplot(@(t) (heaviside(t) - heaviside(t-1)), [-5 5]);
to show 1 between [0,1) and 0 elsewhere. Instead, I get a flat line of all zero. If I change the plot range:
fplot(@(t) (heaviside(t) - heaviside(t-1)), [-2 2]);
that creates the plot that I'd expect over that range.
Further exploration shows that this works:
fplot(@(t) (heaviside(t) - heaviside(t-1)), [-3 3.25]);
but this one does not:
fplot(@(t) (heaviside(t) - heaviside(t-1)), [-3 3.3]);
This looks like a bug in Matlab. Any ideas?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!