Search tips

Search tips

# Discussion Groups | Matlab DSP | SIGNAL TO NOISE RATIO

Technical discussion about Matlab and issues related to Digital Signal Processing.

Is this thread worth a thumbs up?

0

# SIGNAL TO NOISE RATIO - Arma Ann - Feb 2 7:27:09 2009

```Hi All,

I have a set of noise data , x= [1 2 3 4 5 6 ].

g= x+ 0.5* rand(1,6)

How do i calculate the signal to noise ratio of this signal if the variance of
the rand is 0.5.

I know the relationship between SNR and variance, mathematicallly and can
implement that in MATLAB. Is there any function that can calculate that easily
?

The second scenario is that i have a signal

d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i
get the SNR of this signal.

Thanks,

```

# Re: SIGNAL TO NOISE RATIO - Ion Suberviola - Feb 2 10:15:45 2009

```Be careful. rand() is not a Gaussian, but uniformly distributed. You
should
use randn().

SNR(g) = sum(x.*x) / var(g-x);

SNR(d) it is impossible to know it if you dont know anything about the
signal.

2009/1/30 Arma Ann <a...@yahoo.com>

>   Hi All,
>
> I have a set of noise data , x= [1 2 3 4 5 6 ].
>
> I want to add additive white Gaussian noise to it using
>
> g= x+ 0.5* rand(1,6)
>
> How do i calculate the signal to noise ratio of this signal if the
variance
> of the rand is 0.5.
>
> I know the relationship between SNR and variance, mathematicallly and can
> implement that in MATLAB. Is there any function that can calculate that
> easily ?
>
> The second scenario is that i have a signal
>
> d= [ 5 6 7 8 9], no other information than the signal contains noise. How
> do i get the SNR of this signal.
>
> Thanks,
>
>
>
```

# Re: SIGNAL TO NOISE RATIO - fara...@yahoo.co.uk - Feb 3 10:58:05 2009

```Hi,

You could try a diffrent approach. Why don't you add the gaussian noise with
awgn() function. In this case you will specify the exact SNR you need.

On the other hand, SNR is very difficult to be calculated out of a noisy signal
alone. But if you know the noisy signal, and in your case the initial signal you
can obtain the noise. Then you calculate the power of the noisy signal, the
power of the noise, divide them and then calculate the logaritm.

Paul

Hi All,
>
>I have a set of noise data , x= [1 2 3 4 5 6 ].
>
>
>g= x+ 0.5* rand(1,6)
>
>How do i calculate the signal to noise ratio of this signal if the variance
of the rand is 0.5.
>
>I know the relationship between SNR and variance, mathematicallly and can
implement that in MATLAB. Is there any function that can calculate that easily
?
>
>The second scenario is that i have a signal
>
>d= [ 5 6 7 8 9], no other information than the signal contains noise. How do
i get the SNR of this signal.
>
>Thanks,

```

# RE: SIGNAL TO NOISE RATIO - Shailen Segobin - Feb 3 14:17:05 2009

```you could use wavelets to analyse ur components and see which coefficients
are more likely to belong to noise and which ones are more likely to be from a
signal. Any signal must have a source and if you know approximately what your
source is..you might be able to separate them.

Gluck
Shailen

To: m...@yahoogroups.comFrom: a...@yahoo.comDate: Thu, 29 Jan 2009 16:55:56
-0800Subject: [matlab] SIGNAL TO NOISE RATIO

Hi All,I have a set of noise data , x= [1 2 3 4 5 6 ].I want to add additive
white Gaussian noise to it using  g= x+ 0.5* rand(1,6)How do i calculate the
signal to noise ratio of this signal if the variance of the rand is 0.5. I know
the relationship between SNR and variance, mathematicallly and can implement
that in MATLAB. Is there any function that can calculate that easily ?The second
scenario is that i have a signal d= [ 5 6 7 8 9], no other information than the
signal contains noise. How do i get the SNR of this signal.Thanks,

```