Obtaining Sine Wave From Square Wave
Show older comments
Hello,
I have a square wave but this wave is not an ideal square wave. What I mean is, for example from the first sample of positive peak to the last sample of the positive peak, I have 100 datas. In the next positive peak, I have 91 datas. I want to plot a sine wave which changes adaptively by the number of samples in the positive and negative peaks. This sine wave's positive period should end when the square waves positive peak drops to the zero. Or the best continuous wave that fits with this square wave. Thanks for your advices.
3 Comments
Walter Roberson
on 28 Sep 2022
You can certainly splice together cycles, but I am wondering if that is good enough, or if you need more continuity? And I wonder if you need a pure sine for each cycle? For example if you built a sine function with increasing frequency over time then it might be continuous but it would be an increasingly compressed wave (frequency modulation)
tinkyminky93
on 28 Sep 2022
Image Analyst
on 28 Sep 2022
"I have a square wave" <== but you forgot to attach it. Please attach it as a .mat or .txt file with the paperclip icon.
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!