how can I write the time function when I am plotting the convolution of two time continuous signals?

조회 수: 1 (최근 30일)
% assume I have two signals to find and plot their convolution:
s=conv(x,h);
% t= ??
plot(t,s)
% I have error in length, "they should be the same length" is shown as error

답변 (1개)

Ahmet Cecen
Ahmet Cecen 2016년 12월 14일
This question shows a lack of fundamental understanding of convolution. Make sure to read up on what convolution/correlation is and work out a graphical example.
The output of a convolution has a natural origin, and the length of `s` represents time/space lags. So the center element of `s` will be t=0, or when both `x` and `h` are in sync. One element below the center will represent a lag of 1 units of t, or when there is a 1 unit delay between signals `x` and `h`.
Using the above information, you should be able to figure out what the length of the vector `s` means, and how to create a new `t` vector that corresponds to `s`.

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by