Using MatLab to Calculate Signal to Noise Ratio
3 answers
First google result for Matlab SNR . Copied from there in dB:
snr = 10*log10(sum(clean.^2) ./ sum(noise.^2))
EDIT: The signal-to-noise ratio cannot be calculated without knowing the signal strength and noise power. With only knowledge of the observed (ie, Received) signal, one can blindly estimate the SNR, but this is an open research topic. See Measuring Blind Quality.
+7
a source to share
The average noisy
and clean
should be zero:
signal = var(clean(:));
noise = var(noisy(:));
s2n = 10*log10( signal / noise );
From: Comparing and Analyzing Different PDE-Based Approaches for Image Enhancement , p. 4.
+3
a source to share