# Is it possible to generate a sine wave like this? I tried combining 50hz, 100hz and 200hz together but I did not get something like this picture that I provided here.

2 visualizaciones (últimos 30 días)
Sabbir Ahmed el 4 de Ag. de 2022
Comentada: Sabbir Ahmed el 9 de Ag. de 2022
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Bjorn Gustavsson el 4 de Ag. de 2022
Yes it is possible. You will have to make the phase-angle match at the frequency transitions (for simplicity make the time-windows an even number of periods for all three frequencies). And you will have to think about what you get at the transitions.
HTH
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Sabbir Ahmed el 9 de Ag. de 2022
Thanks, I was able to write a code for that.
t = -0:0.001:0.25;
x = 384*sin(2*pi*t*20)+384;
y = 384*sin(2*pi*t*100)+384;
z = 384*sin(2*pi*t*200)+384;
z1 = (t>=0 & t<0.15);
z2 = (t>=0.15 & t<0.2);
z3 = (t>=0.2 & t<0.25);
%mixed signal
result = z1.*x + z2.*y + z3.*z;

Iniciar sesión para comentar.

### Categorías

Más información sobre Signal Generation, Manipulation, and Analysis en Help Center y File Exchange.

R2022a

### Community Treasure Hunt

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

Start Hunting!

Translated by