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?
How to create a piecewise sine function?
9 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!