Filter löschen
Filter löschen

Signals Processing convolution graph

3 Ansichten (letzte 30 Tage)
Emir Dönmez
Emir Dönmez am 20 Apr. 2023
conv(x(t),&(t+t0) what is the eqaul of this equation and how can i plot this equation's graph?

Antworten (1)

Ganapathi Subramanian
Ganapathi Subramanian am 25 Apr. 2023
Hi Emir,
It is my understanding that you are working on convolution and want to know how to perform convolution on time shifted signal [x(t)*x(t+t0)] and plot the graph. Below is the code to perform convolution for time shifted signal.
% Time step to make it a continuous signal
step=0.01;
t=-10:step:10;
% Let the input be a unit step signal
% x(t)
x=t>=0;
subplot(3,1,1);
plot(t,x);
% Let t0 be the value of time shift
% x(t+t0)
% Let t0 be 5
t0=5;
% Time shifted signal => x(t+t0) = x1(t1)
t0=-t0;
if(t0>0)
t1=t(1):step:t(end)+t0;
x1=[zeros(1,t0/step) x];
mini=t(1);
maxi=t1(end);
else
t1=t(1)+t0:step:t(end);
x1=[x zeros(1,abs(t0)/step)];
mini=t1(1);
maxi=t(end);
end
subplot(3,1,2);
plot(t1,x1);
% Convolution of x(t) and x(t+t0)
y=conv(x,x1);
% ty is the variable scale that matches length(y) with the time of input signal
ty=mini:(maxi-mini)/(length(y)-1):maxi;
% Plot the convolution result
subplot(3,1,3);
plot(ty,y);

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by