MATLAB Answers

How to add Hann 5 cycles to the sine wave plot?

3 ビュー (過去 30 日間)
Kaleesh Bala
Kaleesh Bala 2019 年 8 月 9 日
コメント済み: Kaleesh Bala 2019 年 8 月 9 日
I would like to know how to add cycle to the sine plots?
The below one is a sine plot continuous how to make it short for only 5 cycles?where x here is the time and 200 is the load (kHz)
plot(x,sin(2*pi*200e3*x))

  2 件のコメント

darova
darova 2019 年 8 月 9 日
One full cycle of sine is 2pi
You should make your argument of sine: 0 .. 2pi*5
Change your x such that:
0 ... 2pi*200e3 0 ... 2pi*5
Kaleesh Bala
Kaleesh Bala 2019 年 8 月 9 日
Hi Daravo
But my x is time vector
load('x.mat')
sf=200e3;
sinewave=sin(2*pi*sf*x);
figure(1);
plot(x, sinewave);
The above code gives a continuous sine plot
Note : kindly put your answers in the answer section as this will help me to accept it and vote it
Thanks

Sign in to comment.

採用された回答

darova
darova 2019 年 8 月 9 日
One full cycle of sine is 2pi
You should make your argument of sine: 0 .. 2pi*5
img11.png

  14 件のコメント

表示 11 件の古いコメント
darova
darova 2019 年 8 月 9 日
Can you accept my answer?
darova
darova 2019 年 8 月 9 日
I did my best :(
Kaleesh Bala
Kaleesh Bala 2019 年 8 月 9 日
Ah kien problem Thank you so much :)

Sign in to comment.

その他の回答 (0 件)

タグ

製品


リリース

R2018a

Translated by