sir.m 309 B

12345678910111213
  1. % Computation of the Signal to Interferences Ratio between the reference
  2. % signal s1 and its estimation s2.
  3. %
  4. % Inputs
  5. % s1 : reference signal
  6. % s2 : estimated signal
  7. %
  8. % Output
  9. % SIR : Signal to Interferences Ratio between s1 and s2 (dB)
  10. function SIR=sir(s1,s2)
  11. SIR=10*log10(mean(s1.^2)/mean((s1-s2).^2));