0

I have problem with plot of FFT signal

y=sin(log10(16)/log(6));

Here is my code:

y=sin(log10(16)/log(6));
Y = fft(y);
fs = 100;
P2 = abs(Y/length(y));
P1 = P2(1:length(y)/2+1);
P1(2:end-1)=2*P1(2:end-1);
f=fs*(0:length(y)/2)/length(y);
bar(f,P1);
xlabel('f[HZ]');
ylabel('|P1(f)|');

When I plot this code above, Matlab return me only a blue bar...

Szymon
  • 65
  • 8

0 Answers0