Plot a discrete signal

3 Ansichten (letzte 30 Tage)
E
E am 18 Sep. 2019
Beantwortet: Aquatris am 18 Sep. 2019
Hi all,
Im trying to plot the following signal:
but i have no idea how. Can anyone help?
Thanks in advance!

Antworten (1)

Aquatris
Aquatris am 18 Sep. 2019
Here is one way;
n = -5:0.1:5;
index = [find(n==-3) find(n==-1) find(n==1) find(n==3)];
x = zeros(length(n),1);
x(index) = 1;
figure(1)
plot(n,x,'.')
ylabel('x'),xlabel('n'),ylim([-0.1 1.1])

Kategorien

Mehr zu Get Started with DSP System Toolbox 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!

Translated by