t=0:0.001:2*pi;y=sin(t).*sin(2*t);Y=fft(y,1024);f=(0:1023)*2*pi/1024;plot(f,abs(Y));axis([-0.1 2*pi+0.1 0 500]);title('sin(t).*sin(2*t)频谱');