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

Antworten (2)

Star Strider
Star Strider am 17 Dez. 2022

1 Stimme

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 am 17 Dez. 2022

0 Stimmen

u = rand(20,1);
du = u(3:end) - u(1:end-2);
plot(du)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 17 Dez. 2022

Beantwortet:

am 17 Dez. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by