Search code examples
pythonscipysignal-processing

How to find the Coefficients of each Cosine term that makes up a discrete signal?


I have a discrete sequence of N real values. Is there a way to find a list of N-1 real numbers x[n] so that this:

with the nth coefficient is x[n], and each element in my original list is y[k], with k representing the index of the element in the list, starting from k=0, is true?


Solution

  • I believe you are looking for a discrete cosine transform of Type III, as shown here or its inverse.