function result = SNR_multiFreq(oriData,freqFrom,freqTo,resolution)
% result = SNR(oriData, domainFrq,freqFrom, freqTo,resolution)
x_axis = (freqFrom*resolution+1:freqTo*resolution+1);
%range = (freqFrom*resolution+1):(freqTo*resolution+1);
fft_result = abs(fft(oriData));
for i=1:length(x_axis)
    result(i) = fft_result(x_axis(i)) / ((sum(fft_result(x_axis))-fft_result(x_axis(i)))/(length(x_axis)-1));
end

% SNR = fundamental freq / average noise.
%result = fft_result(x_axis(domainFreq-(freqFrom*resolution))) / ((sum(fft_result(x_axis))-fft_result(x_axis(domainFreq-(freqFrom*resolution))))/(length(x_axis)-1));

end