ํ•„ํ„ฐ ์ง€์šฐ๊ธฐ
ํ•„ํ„ฐ ์ง€์šฐ๊ธฐ

Can fploy and ezplot a discrete time signal?

์กฐํšŒ ์ˆ˜: 3 (์ตœ๊ทผ 30์ผ)
Jinquan Li
Jinquan Li 2021๋…„ 2์›” 15์ผ
๋‹ต๋ณ€: Walter Roberson 2021๋…„ 2์›” 15์ผ
I'm trying to plot a discrete time signal : y[n] = 5๐›ฟ(n)+3u(n-3) , for n=[-1:0.01:10] by using fplot or ezplot.
Here's what I've tried but the result seems not correct.
n = [-1:0.01:10];
y = 5*dirac(n) + 3*heaviside(n-3);
fplot(y)
grid on
xlabel('t (time)');
ylabel('[y5(t)]');

๋‹ต๋ณ€ (1๊ฐœ)

Walter Roberson
Walter Roberson 2021๋…„ 2์›” 15์ผ
No. fplot and ezplot are for function handles or symbolic expressions or symbolic functions. They treat numbers as if they were a formula that returned that number.
Use a different plotting function such as stairs or stem

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Spectral Measurements์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

์ œํ’ˆ


๋ฆด๋ฆฌ์Šค

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by