09-06-2017
23,310,
4,623
Join Date: Aug 2005
Last Activity: 7 July 2020, 11:47 AM EDT
Location: Saskatchewan
Posts: 23,310
Thanks Given: 1,331
Thanked 4,623 Times in 4,217 Posts
Your sample rate is way too low. It's just like trying to mathematically approximate the volume of a teapot by calculating the volume of a cube. Far too approximate to be useful!
When I plot your sine wave data, it looks awfully triangular. The crucial area going through the origin, accounting for the vast majority of the waveform, is a straight line from 38 to 217 -- and being symmetrical, can't be anything but a straight line. There's not enough points to represent anything else.
Mathematically speaking, triangle waves and square waves include higher frequencies than their base frequencies. Without a high enough sample rate to catch them, this information is thrown out like a brutal low pass filter. (Or worse, included as aliasing artifacts.)
Your waveforms should not be 8 points per wave. 16 at bare minimum, probably, but why not 1024? Then you'd see reliable differences, all the time.
Last edited by Corona688; 09-06-2017 at 07:42 PM..