필터 지우기
필터 지우기

Signals Processing convolution graph

조회 수: 8 (최근 30일)
Emir Dönmez
Emir Dönmez 2023년 4월 20일
답변: Ganapathi Subramanian 2023년 4월 25일
conv(x(t),&(t+t0) what is the eqaul of this equation and how can i plot this equation's graph?

답변 (1개)

Ganapathi Subramanian
Ganapathi Subramanian 2023년 4월 25일
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);

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by