How to use hanning window to get 5 cyles of sine waves?

조회 수: 15 (최근 30일)
Ramesh Bala
Ramesh Bala 2019년 8월 12일
댓글: mm99 2019년 12월 28일
load ( 'x.mat' )
t = 0: 10 * pi; % 5 cyeles
sf = 200e3; % frequency
sinewave = sin (2 * pi * sf * x); % gen continuous sine waves
w = hanning (length (sinewave)); % hann
figure (1);
plot (w);
% I do not know where to include the 5 cycles here

채택된 답변

Andrey Kiselnikov
Andrey Kiselnikov 2019년 8월 12일
편집: Andrey Kiselnikov 2019년 8월 12일
First of all you should properly define your data: "t = 0: 10 * pi; % 5 cyeles" I assume that you would like to define something like this "t = 0:1/sf:10*pi", more over "t" never used. Can you describe your task more properly?
>> t = 0: 10 * pi
t =
Columns 1 through 17
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Columns 18 through 32
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  댓글 수: 13
Ramesh Bala
Ramesh Bala 2019년 8월 12일
So,how to make it to start as modulated signal and then after 5 cycles to be flat signal =0
mm99
mm99 2019년 12월 28일
Hi!
Did you get the result? I need the same thing and stucked in the same moment.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by