How to create a piecewise sine function?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey all,
I am a trying to create an alternating sine wave of two seperate frequencies over a specified length of time. I have specified my 1 column of points in time and want to calculate the y(x) function/position.
I have my y(x)=sin(w*t)and y2(x)=sin(w2*t)functions, but am not sure how to create this piecewise wave? I am trying to use a for loop with if statements to do this , but I am finding this diffcult. How would you try to accomplish this?
0 commentaires
Réponses (1)
Walter Roberson
le 23 Sep 2011
Are the sine wave segments to be pieced together only on full-cycle boundaries, or is it necessary to match phase because one just leaves off and the other begins at the same point? Or if the boundary is not a full cycle, is it allowed for there to be a "glitch" in switching from the one to the other?
0 commentaires
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!