Time shift and scale a conv()

41 views (last 30 days)
Turner Kaminski
Turner Kaminski on 27 Jan 2022
Answered: vidyesh on 2 Nov 2023
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 Comment
Paul
Paul on 28 Jan 2022
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?

Sign in to comment.

Answers (1)

vidyesh
vidyesh on 2 Nov 2023
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.

Categories

Find more on Get Started with Signal Processing Toolbox in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!