Implement an alternative to SNR function

1 次查看(过去 30 天)
Folks,
I have x as following:
[x,Fs] = audioread(strcat(PathName,FileName));
And some noise in the form of alpha*v as below:
rng('default');
alpha=0.2;
v = randn(size(x));
I don't have Signal Processing toolbox to use snr() function. How can I find SNR as given in this equation?

回答(1 个)

Walter Roberson
Walter Roberson 2015-9-22
  2 个评论
Hasan Ghorbani
Hasan Ghorbani 2015-9-24
编辑:Hasan Ghorbani 2015-9-24
Thansk. Am I right by using following code:
x_snr_db = 20 * log10( sum(x.^2) / sum((alpha * v).^2) );

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 PHY Components 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by