-1
$\begingroup$

I am new to signal processing concept, so this can be easy question.

Actually, I want to display cosine signal by using python scipy.signal module. The method signal.cosine() takes only the number of points, called also as samples. When I try to execute the code below, I get only short and one part of the cosine signal. However, I want to obtain whole, long, and periodic cosine signal. How can I do that ?

from scipy import signal
import matplotlib.pyplot as plt

window = signal.cosine(50)
plt.plot(window)
plt.show()
$\endgroup$
2
$\begingroup$

signal.windows.cosine is a window function, not a signal, as it says in the docstring:

Return a window with a simple cosine shape.

You want something like numpy.cos(2*pi*f*t).

|improve this answer|||||
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.