Hello,
I've imported a wav file into MATLAB as below: -
Thanks
I've imported a wav file into MATLAB as below: -
How would I know if MATLAB is plotting the right length of time, frequency and PSD? Also I would like to prevent MATLAB from plotting the negative frequencies.[X Fs nbits] = wavread ('file directory');
subplot(2,1,1);plot(X);
title('X(t)');
xlabel('Time (s)');
ylabel('Amplitude (V)');
grid on;
subplot(2,1,2);plot((abs(fft(X))));
title('X(f)');
xlabel('Frequency (Hz)');
ylabel('Power Spectral Density');
grid on;
Thanks
Last edited: