how to convolute two discrete impulse functions

14 Ansichten (letzte 30 Tage)
justin stephens
justin stephens am 25 Feb. 2018
Kommentiert: Bilal am 24 Nov. 2022
Im having a few issues trying to figure out the syntax to convolute two discrete impulse functions. any help on the syntax would be great. here are the two signals
x[n]= -delta[n+1] + 0.5delta[n] + 2delta[n-1] h[n]= 2delta[n] + delta[n-1]
  1 Kommentar
justin stephens
justin stephens am 25 Feb. 2018
i mean i don't know how to write the two signals in matlab. i know a little bit about the conv() function.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Shounak Shastri
Shounak Shastri am 26 Feb. 2018
x[n]= -delta[n+1] + 0.5delta[n] + 2delta[n-1]
h[n]= 2delta[n] + delta[n-1]
"I don't know how to write the two signals in matlab"
So basically your signals are
x = [-1, 0.5, 2];
h = [1, 2];
You can convolve the two signals by using
y = conv(x, h);
Use the different options (under the heading 'shape' in the input arguments part) given in the help section and see which one is suitable for your use.
  2 Kommentare
justin stephens
justin stephens am 27 Feb. 2018
thank you very much! i got it to work.
Bilal
Bilal am 24 Nov. 2022
Please! how we can plot each signals x, h and y ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by