I have written a code to plot continuous and discrete version of the chirped signal.
import numpy as np from scipy.signal import chirp, spectrogram import matplotlib.pyplot as plt %matplotlib qt N = 400 t = np.linspace(0, 2, N) f0 = 0 f1 = 10 t1= 2 Fs = 8000 n = np.arange(N) alpha = (f1 - f0)/t1 w = np.cos(2*np.pi*f0*t + np.pi*alpha*t**2) plt.plot(t, w) w_d = np.cos(2*np.pi*f0*n/Fs + np.pi*alpha*(n**2)/Fs) plt.plot(n / (N/2),w_d, 'ro')
Although N is completely taken randomly. It gave me a smooth curve for a continuous version. I don't know if my plot is correct or not. However, I am stuck now. what does the question mean? How to find the counts crossing the absicca? For zero-crossing, as far as I understood, the count would vary for N? I'd appreciate it if anyone could help me understand the question.