How do you plot FFT of a signal in Matlab?
Y = fft(X); Compute the single-sided amplitude spectrum of the signal. f = Fs*(0:(L-1)/2)/L; P2 = abs(Y/L); P1 = P2(1:(L+1)/2); P1(2:end) = 2*P1(2:end); In the frequency domain, plot the single-sided spectrum.
How do you plot an audio signal in Matlab?
Plot Audio Data
Create a vector t the same length as y , that represents elapsed time. t = 0:seconds(1/Fs):seconds(info. Duration); t = t(1:end-1); Plot the audio data as a function of time.