Plot a discrete signal

조회 수: 2 (최근 30일)
E
E 2019년 9월 18일
답변: Aquatris 2019년 9월 18일
Hi all,
Im trying to plot the following signal:
but i have no idea how. Can anyone help?
Thanks in advance!

답변 (1개)

Aquatris
Aquatris 2019년 9월 18일
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])

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by