MATLAB Frequency Spectrum Angular Interpolator

Frequency spectrum - MATLAB


Script description:

  • Script works with a nominal signal frequency of 1 Hz.
  • Based on the signal, the maximum angular frequency and multiples of the sampling frequency are expressed by the formula for the angular frequency. The sampling rate is at 2 * maximum angular frequency.
  • The waveform (spectrum) of the angular frequency is plotted in a line graph.
  • For the second waveform, the interpolation factor L = 2 is also expressed on the sampling angle frequency, which compresses the signal spectrum by half.
  • This makes it possible to insert a copy of the previous sample into the spectrum, as the compressed spectrum allows.
  • For the third signal, the interpolation factor is similar to L = 3, which compresses the spectrum to one third. This allows you to insert up to two copies into the plotted progress
  • Use in frequency design of digital filters. The use of an interpolation factor or an interpolator block prevents aliasing - overlapping of frequency spectra.
  • Script also uses specific x-axis function values, which are multiples of the sample angular frequency and the maximum angular frequency, respectively.
  • Source code on Github: Github repo