filename = 'datacollect2.xlsx';N = length(filename);fs = 400; fnyquest = fs/2;num = xlsread(filename); y = num(: ,2); mags = abs(fft(y));bin_vals = [0 : N-1];fax_Hz = bin_vals*fs/N;N_2 = ceil(N/2);plot(mags(1:N_2),fax_hz(1:N_2))xlabel('Frequency (Hz)')ylabel('Power (dB)');title('Single-sided Power spectrum (Hertz)');axis tight
MATLAB: Hello; Can someone please help me matlab doesn’t plot the excel data it show the axis only I am trying to make spectral analysis.i have attested the excel file and code as well.
spectrum analysis
Best Answer