?? snrpolarity.m
字號(hào):
% SNRPOLARITY Signal to Noise ratio%% [a,p] = snr(est,org)%% est = the estimate vector% org = the original vector% a = the SNR in dB% p = the est polarity with minimum snr %% tests for est and inverted est, function returns largest SNR%% 20Log10(Orig/Err)%% Paul D. O'Grady - 14-11-2003% (paul.ogrady@may.ie)function [a,p] = snrPolarity(est,org)orgNorm = org/norm(org);estNorm = est/norm(est);SNR(1) = norm(orgNorm)/norm(estNorm-orgNorm);estNorm = (est*-1/norm(est*-1));SNR(2) = norm(orgNorm)/norm(estNorm-orgNorm);[SNRResult polarity] = max(SNR);%return resultsa = 20*log10(SNRResult);if (polarity == 2)p = -1;elsep = 1;end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -