how do plot x(n)=u(n-2)-u(n-5)
89 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hello i need plot for signal x(n)=u(n-2)-u(n-5) thanks.
0 Kommentare
Akzeptierte Antwort
Maik
am 5 Nov. 2022
n = (-20:20);
u_n = n>=0;
u_n_2 = n>=2;
u_n_5 = n>=5;
u_diff = u_n_2 - u_n_5;
subplot(3,1,1); stem(n,u_n_2);xlim([-15 15]); ylim([-2 2])
subplot(3,1,2); stem(n,u_n_5);xlim([-15 15]); ylim([-2 2])
subplot(3,1,3); stem(n,u_diff);xlim([-15 15]); ylim([-2 2])
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!