Time shift and scale a conv()

30 次查看(过去 30 天)
Turner Kaminski
Turner Kaminski 2022-1-27
回答: vidyesh 2023-11-2
I have a problem where I am finding z = conv(y(t),y(t)).
I want to test whether z(2t-1) = {y(t)*y(2t-1)} or {y(2t-1)*y(2t-1)}
I know how to prove this mathematically, but i must also print and compare the graphs. However I do not know how to time scale/delay z to create z(2t-1) since the conv() function does not have an apparent place to affect the time inputs.
Any help would be appreciated!
  1 个评论
Paul
Paul 2022-1-28
Is there a source that shows a time scaling property of the convolution? That is if
z(t) = y(t)*y(t) * means convolution
then
z(2t) = ??
Or alternatively,
?? = y(2t)*y(t)
?? = y(2t)*y(2t)
Is there a known form for ?? in any of the above?

请先登录,再进行评论。

回答(1 个)

vidyesh
vidyesh 2023-11-2
Hi Turner,
I understand that you want to know how to time scale or delay a signal in MATLAB.
To achieve time scaling or delay of a signal in MATLAB, we need to manipulate the time axis rather than the signal itself, as the magnitude of the signal remains unchanged.
The code snippet below demonstrates how to introduce a delay in the signal and how to calculate the time range for convolution of two signals:
t = 0:10;
t_z = linspace(t(1) + t(1), t(end) + t(end), numel(t) + numel(t) - 1); % Time range for conv(y(t), y(t))
y = [0 1 1 1 zeros(1,7)]; % Sample signal
z = conv(y,y);
% Plotting y(t) and y(t-2)
figure
stem(t+2, y, 'Marker', 'x')
hold on
stem(t, y)
hold off
% Plotting y(t) and z(t) = conv(y(t), y(t))
figure
stem(t, y, 'Marker', 'x')
hold on
stem(t_z, z);
hold off
Refer to the following documentation to learn more about convolution.
Hope this answer helps.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by