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 Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by