Hi guys,
I have the following function:
impulse_response = zeros(1, length(input) + length(delta) - 1 );for t_samp = 1:length(input)for c_samp = 1:length(delta) index = t_samp + c_samp - 1;value = delta(c_samp) * input(t_samp);impulse_response(index) = impulse_response(index) + value;endend
I am new to Matlab and I want to understand how to Implement a convolution function in MATLAB and perform it on the following signals and plot the results ?
Task (1):
x[n] = [1,1,1,1] h[m] = [1,0,−1] x[n] = sin(n) h[m] = [−1,−2,8,−2,−1] 20 ≤ n < 20
Task (2): Given the input signal x[n]=0.3∗sin(n/5)+sin(n/50) : -Create your own delta signal h[m] that removes the higher frequency sinusoidal component to get yl[n].
Thanks in advance for your kind explanation.
Best Answer