convolution of a signal with itself

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)

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);

Asked:

on 3 Dec 2015

Answered:

on 5 Apr 2023

Community Treasure Hunt

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

Start Hunting!