convolution of a signal with itself

19 views (last 30 days)
mucha lucha
mucha lucha on 3 Dec 2015
Answered: Amna on 5 Apr 2023
I need help to make the convolution of a signal with itself. the signal looks like : x(t)=u(t+0.5)-u(t-0.5)

Answers (2)

Guillaume
Guillaume on 3 Dec 2015
Simply use conv:
t = linspace(0, 2*pi, 1000); %for example
u = @sin; %for example
x = u(t+0.5) - u(t-0.5);
selfconv = conv(x, x, 'same');
plotyy(t, x, t, selfconv);

Amna
Amna on 5 Apr 2023
t = linspace(0, 2*pi, 1000); %for example
u = @sin; %for example
x = u(t+0.5) - u(t-0.5);
selfconv = conv(x, x, 'same');
plotyy(t, x, t, selfconv);

Community Treasure Hunt

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

Start Hunting!