Compute and interpret the spectrum of a continuous-time signal.
Build a Fourier analysis tool: compute the amplitude/phase spectrum of a signal via FFT, map bins to real frequencies, and reconstruct the signal from its dominant components.
Write spectrum(x, fs) returning the one-sided amplitude spectrum and frequency axis, verify it on a sum of known tones, and reconstruct the signal keeping only the strongest components.
Acceptance criteria
0/4
Workspace
Deliverables
•spectrum() + a reconstruction demo.
•An amplitude-spectrum plot.
Stretch goals
•Add windowing (Hann) and show reduced spectral leakage.