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

5 visualizaciones (últimos 30 días)
Ramesh Bala
Ramesh Bala el 9 de Ag. de 2019
Comentada: Ramesh Bala el 9 de Ag. de 2019
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 comentarios
darova
darova el 9 de Ag. de 2019
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
Ramesh Bala
Ramesh Bala el 9 de Ag. de 2019
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

Iniciar sesión para comentar.

Respuesta aceptada

darova
darova el 9 de Ag. de 2019
One full cycle of sine is 2pi
You should make your argument of sine: 0 .. 2pi*5
img11.png
  14 comentarios
darova
darova el 9 de Ag. de 2019
I did my best :(
Ramesh Bala
Ramesh Bala el 9 de Ag. de 2019
Ah kien problem Thank you so much :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by