我有FFT信号图的问题
y=sin(log10(16)/log(6));
这是我的代码:
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)|');
当我在上面绘制这段代码时,Matlab只给我一个蓝色条...