Add a varying phase shift to a sine wave (linspace involved)
Mostrar comentarios más antiguos
Hello,
I have created a sine wave using the linspace function (see below), and using that wave and another one at a different frequency I have created an FSK signal by adding them together. Now I want to add another sine signal to this FSK signal but with a varying phase shift in order to simulate a fading channel.
ask1 = sin(linspace(0,2*pi*f1*transmission_time,total_samples));
So far I was just able to add a signal with a constant phase shift therefore my channel is not realistic enough and that is why I want to introduce a varying phase shift. The code used for the constant phase shift follows:
fade_sig = sin(linspace(0,2*pi*f1*transmission_time,total_samples) - (pi));
Some limitations are that I do not want to change the linspace function use in order to create the sine wave, as it is a vital component to my program because of the use of samples(total_samples) in order to create graphs and produce good results. Some ideas are the use of for loops and pre-creating a vector of phase shift and then using that to add it to the signal but seems too complicated to implement because of the use of the linspace function. Is there a easier method that I can approach this issue.
Thank you in advance Andrew
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Simulation, Tuning, and Visualization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


