function resultCorrect=spectrumcorrectfftftmethod(inputDate,fStart,fEnd,fDelt,windowType,fs)
%功能:采用FFT+FT法对加矩形窗和hanning窗做离散频谱校正;信号的模型为Acos(2*pi*f*t+pha),注意t从0开始
%输入:inputDate待分析数据,数据长度为偶数,统一为行向量;fDelt细化频率分辨率;fStart,fEnd细化的起始频率;windowType窗函数类型,1为矩形窗,2为汉宁(hanning)窗;fs采样频率
%输出:resultCorrect校正后的频率,幅值,相位结果
resultCorrect=zeros(1,3);
N=length(inputDate); %数据长度
if mod(N,2)==1
error('数据长度必须为偶数')
end
if windowType==1 %时域加矩形窗
cR=1; %恢复系数
end
if windowType==2 %时域加汉宁窗复数谱
w=hann(N,'periodic'); %要选择periodic,保证与理论推导公式一致
inputDate=inputDate.*w';
cR=2; %恢复系数
end
% %细化过程