Bug Plotting Heaviside Step Function
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!