creating sine wave with variable frequency depending on variable
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kai Falkenhain
el 9 de Oct. de 2021
Comentada: Mathieu NOE
el 12 de Oct. de 2021
So I need a sine wave that has a variable frequency. The freuqency is depending on a variable. If the variable increases, the frequency should also increase, but if the variable stays constant, the frequency should also be constant. So the variable looks like that.
And with this setup
where Omega is the variable I got it to work, but of course over time the frequency still increases because of the clock. But without the clock the sine wave changes to a constant value if the vairable gets constant.
Maybe the sine wave block can help but I didn't find any way how I can integrate a variable into the block.
Does somebody know how to create the described sine wave?
0 comentarios
Respuesta aceptada
Mathieu NOE
el 11 de Oct. de 2021
hello
this is my suggestion - see attachement (R2020b)
code for initialization :
Fs = 1000;
dt = 1/Fs;
% angular table
n = 360; % one degree resolution
angl = (0:(n-1))*2*pi/n;
tabl_sin = sin(angl);
open('sine_vco.slx');
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Sources en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!