R = snr(X)
R = snr(X, Noise)
R = snr(X, Fs)
[R, NoisePower] = snr(...)
| Parameter | Description |
|---|---|
| X | signal. |
| Noise | noise signal with the same dimensions as X. |
| Fs | sample rate for spectral SNR estimation. |
| Parameter | Description |
|---|---|
| R | ratio in decibels. |
| NoisePower | linear noise power estimate for direct noise input, or noise power in decibels for spectral estimation. |
snr computes a direct signal-to-noise ratio when a noise vector is supplied. With a scalar sample rate, it estimates sinusoidal SNR from the spectrum.
[r, n] = snr([1 1 1], [0.1 0.1 0.1]);
| Version | Description |
|---|---|
| 2.0.0 | initial version |