function [snr]=SNR(f1,f2)[numCh,dataLen]=size(f1);if numCh>1 f1=reshape(f1,1,numCh*dataLen); f2=reshape(f2,1,numCh*dataLen);endsnr=10*log10(sum(f1.^2)/sum((f1-f2).^2));f1=af2=a+b