Question: Help me!!! import numpy as np import matplotlib.pyplot as plt def plot_waveform(x, sample_rate): TODO: IMPLEMENT ME Plot the time domain signal `x`. This is

Help me!!!

import numpy as np import matplotlib.pyplot as plt def plot_waveform(x, sample_rate): """ TODO: IMPLEMENT ME Plot the time domain signal `x`. This is be a time-amplitude plot, in which the x-axis is labeled in seconds based on the `sample_rate` argument. NOTE: Do not call `plt.show()` within the function. Args: x (np.array): the 1-dimensional time domain audio signal. sample_rate (float): the sample rate in Hz. Returns: None """ plt.gca() # replace the following line with an actual implementation that returns something raise NotImplementedError() def plot_spectrum(X, sample_rate): """ TODO: IMPLEMENT ME Plot the magnitude spectrum of X. The x-axis should be frequency in Hz. The y-axis is magnitude in decibels. Feel free to limit the y-axis (i.e. clip off very low magnitudes) Only display frequencies up to and including the Nyquist frequency. NOTE: Do not call `plt.show()` within the function. Args: X (np.array[complex]): A frequency domain signal X, e.g. `X = dft(x)` sample_rate (float): sample rate in Hz Returns: None """ plt.gca() # replace the following line with an actual implementation that returns something raise NotImplementedError() 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!