How to plot u(t) - u(t-2) on matlab

Respuestas (2)

Star Strider
Star Strider el 17 de Dic. de 2022
If ‘u(t)’ is the unit step (heaviside) function —
syms t
u(t) = heaviside(t);
figure
fplot(u(t)-u(t-2), [0 5])
grid
xlabel('t')
ylabel('Amplitude')
axis('padded')
.
Torsten
Torsten el 17 de Dic. de 2022
u = rand(20,1);
du = u(3:end) - u(1:end-2);
plot(du)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de Dic. de 2022

Respondida:

el 17 de Dic. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by