【信号】高斯噪声

 


一、概念

指它的概率密度函数服从高斯分布(即正态分布)的一类噪声。

如果一个噪声,它的幅度分布服从高斯分布,而它的功率谱密度又是均匀分布的,则称它为高斯白噪声。

 

二、生成高斯分布随机数

复制代码
public double GetGaussDistributeRandom(double miu, double sigma2)   // 均值 方差
{
    Random ran = new Random(GetRandomSeed());
    double r1 = ran.NextDouble();
    double r2 = ran.NextDouble();
    double r = Math.Sqrt((-2) * Math.Log(r2)) * Math.Sin(2 * Math.PI * r1);
    double result = miu + sigma2 * r;
    Console.WriteLine(result);
    return result;
}
 
public static int GetRandomSeed() //产生随机种子  
{
    byte[] bytes = new byte[4];
    System.Security.Cryptography.RNGCryptoServiceProvider rng = new System.Security.Cryptography.RNGCryptoServiceProvider();
    rng.GetBytes(bytes);
    return BitConverter.ToInt32(bytes, 0);
}
复制代码

 

posted @   不溯流光  阅读(308)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
历史上的今天:
2020-09-09 【c#】如何用matlab绘制map图
2020-09-09 【WinForm】Dev 关于改变控件可见属性时发生异常的问题 System.ArgumentNullException:Value cannot be null.
点击右上角即可分享
微信分享提示