Help with discrete convolution
Ältere Kommentare anzeigen
Hi,
I need help with compute convolution between z1 and z2. I don't know how to define the functions(start from 0).
z1=U[n]-U[n-5] (z1= 1 for n=0,1,2,3,4)
z2=delta[n-5]
thank you.
2 Kommentare
Guillaume
am 5 Aug. 2019
" I don't know how to define the functions(start from 0)."
What function?
What is U and what is delta?
Walter Roberson
am 6 Aug. 2019
U[] typically denotes the unit step function.
Akzeptierte Antwort
Weitere Antworten (1)
You need to first form two vectors, z1 and z2 where z1 hold the values of your first series, and z2 holds the values of your second series. You can then use the conv function, so for example:
z1 = [1 8 7 2 3 4 5 9 2.3 11] % just made up data for example
z2 = [2 9 22 1.3 9 4 2.8 7 9] % just made up data for example
y = conv(z1,z2)
In my made up example, I just assigned the vectors to some numerical values. You may have a function, or some experimental data that you will use to obtain values that are then assigned to the vectors z1 and z2
See documentation https://www.mathworks.com/help/matlab/ref/conv.html
1 Kommentar
iz
am 6 Aug. 2019
Kategorien
Mehr zu Correlation and Convolution finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
