yifeng2030 发表于 2007-5-24 15:33

急急急

tt = -4095/2000:1/2000:4095/2000;
yy = cos(2*pi*100.4*tt+pi/3)+cos(2*pi*150.6*tt+pi/2);
NFFT = 4096;
yy1 = yy(1:NFFT*2-1);
yy1 = yy1(:);
%vecter =;
%vecter = vecter/NFFT;
vecter =conv(hanning(NFFT)',hanning(NFFT)');
vecter = vecter/NFFT/max(vecter);
for ii = 1:NFFT-1,
    yy2(ii) = vecter(ii)*yy1(ii) + vecter(NFFT+ii)*yy1(NFFT+ii);
end
yy2(NFFT) = vecter(NFFT)*yy1(NFFT);
yy2=;
yy2_fft = fft(yy2,NFFT);
yy2_phase = phase(yy2_fft)*180/pi;
yy2_phase = mod(yy2_phase,360);
disp('初相位测量值')
yy2_phase(206)
yy2_phase(310)

为什么我加一个n次循环运行后yy2的长度是4096+n,而不是4096呢?
页: [1]
查看完整版本: 急急急