- How do you smooth a sine wave in MATLAB?
- How do you add sine waves of different frequencies?
- How do you add two sine waves with different frequencies in MATLAB?
How do you smooth a sine wave in MATLAB?
Use the Savitkzy-Golay filter with order 3 or 5. It will smooth it right out. Post your data if you want a demo. As you know, the sine wave can be estimated as a Taylor series so with enough terms and the proper window size in the Savitzky-Golay filter you should be able to get a reasonable sine wave out.
How do you add sine waves of different frequencies?
You can't add two sines of different frequencies. This is a fundamental limit which much of math and physics takes advantage of. Its also the basis of the fourier transform. To put it simply, sines of different frequencies are orthogonal.
How do you add two sine waves with different frequencies in MATLAB?
t = r + y; subplot(3,1,3); %plot (x,y);