フィルターのクリア

sine generation with hanning window

5 ビュー (過去 30 日間)
mm99
mm99 2019 年 12 月 28 日
編集済み: mm99 2020 年 1 月 20 日
Hi !
How can I generate a sine as same as the one attahed?
I tried something like this, but its still quite different :
close all
clc
clear all
fs=1e6; %sampling freq
dt1=1/fs;
f=5e4; %sine freq
T1=1/f; %sine period
n=10; %periods
tt=n*T1;

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 12 月 29 日
#Do change the frequency ar per the requirements
fs=1e9; %sampling freq
dt1=1/fs;
f=5e9; %sine freq
T1=1/f; %sine period
n=10; %periods
tt=n*T1;
t1 = linspace(0,tt);
t2 = 0:dt1:tt;
burst=sin(2*pi*f*t1);
%%--------Changed Here
ww1=hanning(length(burst)/2);
ww=[ww1;zeros(length(burst)/2,1)];
%%----------------------
signal=burst.*ww';
subplot(3,1,1)
plot(t1,burst)
subplot(3,1,2)
plot(t1,ww)
subplot(3,1,3)
plot(t1,signal)
234.png
  2 件のコメント
mm99
mm99 2019 年 12 月 29 日
Thank you!! It helped me :)
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 12 月 29 日
My pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWaveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by