フィルターのクリア

HOW CAN I TIME SHIFT A SIGNAL (FOR EXAMPLE I HAVE GAUSSIAN PULSE AND I WANT TO SHIFT ITS PEAK 3ms IN TIME)

9 ビュー (過去 30 日間)
Everyone just please help me with this question. I have a pulse signal
signal = exp(-((t.^2).*((f0)^2))./(Var_Sq));
just for now don't care what are var_sq, f0 and t. I just want to add a delay which is 3ms to this signal and observe its peak not on 0 index. but on the 3ms index. I have searched the answer of this simple question but nobody knows it.
As a note: (t-t0) is not working. Please give me a support.

回答 (1 件)

Mathieu NOE
Mathieu NOE 2021 年 1 月 2 日
hi
see below
time shifting do actually work
I choose f0 fast enough so that a 3 ms delay is long compare to the pulse period
f0 = 2e3;
Var_Sq = 1;
Fs = 1e5;
dt = 1/Fs;
samples = 1e3;
t = dt*(0:samples-1);
offset = 300*dt; % 3 ms delay
signal1 = exp(-((t.^2).*((f0)^2))./(Var_Sq));
signal2 = exp(-(((t-offset).^2).*((f0)^2))./(Var_Sq));
figure(1),plot(t,signal1,'b',t,signal2,'r');grid

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by