Omid1989
Omid1989

Reputation: 121

How to calculate SNR of signals in MATLAB?

I've encountered a very simple, yet fundamental problem on calculating the SNR:

There are several signals :

Now I want to compare the SNR before and after performing the noise-reduction algorithm.

  1. Which signals should I consider for SNR_before!? S1/N1 or S2/N1 ?

  2. Which signals should I consider for SNR_after!? S3/N1 or S3/N2 ?

  3. Which commands or functions should I use in MATLAB in order to compute SNR_before and SNR_after?

Thanks a billion for putting your time on helping me.

Upvotes: 1

Views: 16321

Answers (1)

Danny
Danny

Reputation: 23

What i know about calculating snr before :

snrBeforeNoise = mean( signal .^ 2 ) / mean( noise .^ 2 );

and about snr after :

residual_noise = signal - noise_reduced_signal; snr_after = mean( signal .^ 2 ) / mean( residual_noise .^ 2 );

Upvotes: 1

Related Questions