4

This visual phenomenon appears because the maximum frequency is close to the Nyquist frequency, or half the sampling frequency. Sampling begins to approach the limit of $2$ samples per period, and thus the linear interpolation performed by Matlab becomes highly inaccurate. However, samples are correctly located, as you can see from the code where an higher ...


2

If your code is working correctly, than there should be no aliasing. Most likely this is a problem with your playback system. Most sound cards in computers are terrible and will create a lot of noise and other artifacts. Since the 19 kHz tone is inaudible for most people, you just hear the artifacts. It's also possible that you turn up the volume too high....


2

I think you are confused by negative frequencies and what they mean so let me add this explanation. When you see a spectrum that contains "positive" and "negative" frequencies, each of the frequencies are of the form: $$e^{j\omega t}$$ Where $\omega$ is the frequency (in this case angular frequency as $2\pi f$ with f being the frequency in Hz. The ...


1

Yes you are right. Aliasing only happens when you sample (either analog to digital conversion or during digital downsampling) a signal and refers to the overlap of signal spectrum due to an inadequate sampling rate; sampling rate below the Nyquist rate. Aliasing cannot happen at the output of a DAC (digital to analog converter). What happens is, if you do ...


1

Suppose if your sampling rate is fs, then the corner frequency of the Anti Aliasing filter would be fs/2


1

If you do spectral analysis is typically better to use WAY more points then 10 in the time domain Look at your y axis and make sure your graphs are properly scaled. $f=10$ aliases indeed back to $f=0$. All you see is numerical noise and your y-scale is $10^{-15}$. This would be different if you choose a a different phase, cosine instead of sine.


1

There are few problems in the code and question. In your question 'given a sine wave at a given frequency for example, how would you proceed to downsample it to a lower frequency' this statement is not right. We are not reducing the frequency of sinewave, we are reducing the sampling frequency with which we sampled it. Second, the code just inserts zeros ...


1

For the Hanning window, the zero crossings occur at a much wider bandwidth (trading for lower side-lobe height) compared to a rectangular window (sharper main-lobe width but higher side-lobe). You need to be careful with the requirements regarding the choice of window given the trade off between side-lobe height and main-lobe width.


1

Peter said it all in his comment, but I'll try to explain it here in a bit more detail. Your thinking is correct, but incomplete. Of course, the component at $f=300$ (unit depends on normalization of $t$) will not cause aliasing, so there will be no additional component below Nyquist, but what you forget is that sampling makes the spectrum periodic with ...


1

An ideal low pass filter has perfect attenuation above the cut off frequency. So any aliasing distortion in that band will be filtered out. In your example, this means any content above 3kHz. For this application fmax can be made to extend up to the sample rate less the cutoff frequency of the low pass, or 21kHz.


1

This is a phenomenon called aliasing https://en.wikipedia.org/wiki/Aliasing Usually, there are anti-aliasing filters that will filter out signals with frequencies higher than fs/2. However, in your case I think there isno anti-aliasing filter. Hence your 14 kHz-signal aliases to 2 kHz. Since f > fs/2, then apparent frequency = 16 kHz - 14 kHz = 2 kHz


Only top voted, non community-wiki answers of a minimum length are eligible