Generating spike using decaying exponential sinusoid of frequency 10^7Hz

4 ビュー (過去 30 日間)
Reji G
Reji G 2022 年 4 月 21 日
コメント済み: Mathieu NOE 2022 年 4 月 21 日
How to generate this spike?(Spike only. Not the sine wave). It should be generated with an exponential decaying sinusoid. The frequency of sinusoid is 10^7 Hz. If not possible to generate using exp. function, please suggenst other idea.

採用された回答

Mathieu NOE
Mathieu NOE 2022 年 4 月 21 日
hello
try this code ; I guessed the pattern period about 0.01 second but you can of course modify it
Fs = 1e7;
dt = 1/Fs;
one_signal_period = 0.01;
t=(0:dt:one_signal_period-dt); % remove one sample at the end ( dt) to avoid duplicate with next segment first point
a= 5*exp(-t/0.0007);
a(1) = 0;
b=1*exp(-t/0.0007);
b=flip(b);
y = a+b;
figure(1)
plot(t,y,'b');
% create repetitions of the signal
rep = 5; % repetitions
y_rep = [];
for k = 1:rep
y_rep = [y_rep y*(-1)^k];
end
t_rep = (0:numel(y_rep)-1)*dt;
figure(2)
plot(t_rep,y_rep,'b');
  2 件のコメント
Reji G
Reji G 2022 年 4 月 21 日
Accepted with heartful Thanks.......
Mathieu NOE
Mathieu NOE 2022 年 4 月 21 日
as always, my pleasure !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAI for Signals についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by