I get the wrong signal to noise ratio using snr() from the Signal Processing toolbox.

조회 수: 4 (최근 30일)
Hi!
I need some help using snr().
When I use snr() on the column vector I want to calculate the SNR of, it returns -10.5526.
I plotted this column vector below, with the peak visible on the right. Clearly the SNR should be around 2-5.
Anyone knows what I am doing wrong?
Thanks in advance!
  댓글 수: 2
AndresVar
AndresVar 2022년 2월 14일
편집: AndresVar 2022년 2월 14일
edit: clarifcation of snr(x) vs snr(x,y)
is that the full signal and are you saying the peak at index ~460 is the actual signal?
If you use snr(x) then the signal is assumed sinusoidal but your's is not.
So you must use snr(x,y) where y is the assumed noise.
To get noise estimate you can look at the spectrum in the window without signal, or you use the rssq as shown in the example: Signal-to-noise ratio - MATLAB snr (mathworks.com)
Kevin Jansen
Kevin Jansen 2022년 2월 14일
편집: Kevin Jansen 2022년 2월 14일
Hey! thanks for your answer. Almost the whole range is just noise, only the peak at ~460 is actual signal.
Okay I think I just got it to work by your comment.
I have multiple of these column vectors, where the signal at ~460 stays around the same value.
I made a new vector containing all these signal peak values.
I also made a vector with the same size by taking the value at ~300 of all the data vectors I have.
I used these two signal vector and noise vector and put in in snr(xi,y), and it returned 4.17.
This seems to be correct, thank you!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by