c# - C# 的正态累积分布

标签 c# unity-game-engine math cumulative-sum

我正在尝试将以下数学方程从正态累积分布表达式转换为 Unity 中的 C#。 NORMSDIST 是 Excel 中使用的表达式,我想通过它是否可以在 C# 中完成此操作。那么这个方程有没有简化的方法呢?

Cumulative

标准分布 (-0.48) = 0.31

最佳答案

感谢您的评论。我使用 using MathNet.Numerics; 实现了这一点。您可以通过安装 NuGet 下载此 Unity 包 - https://github.com/GlitchEnzo/NuGetForUnity .

因此,以下方法有效:

using System;
using System.Collections;
using System.Collections.Generic;
using MathNet.Numerics;
using UnityEngine;

public class CumulativeFunction : MonoBehaviour {
    void Start () {
        F (-0.48f);
    }

    static double F (double x) {
        MathNet.Numerics.Distributions.Normal result = new MathNet.Numerics.Distributions.Normal ();
        return result.CumulativeDistribution (x);

    }

}

关于c# - C# 的正态累积分布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67163617/

相关文章:

c# - 是否有使用属性将注入(inject)参数绑定(bind)到成员字段的包?

c# - .FirstorDefault() 的安全使用?

c# - DLL 中的 Unity C# 脚本

c# - Unity5.3 Json如何使用unities new Json实用程序构造复杂的Json对象

unity-game-engine - 将 Unity 应用程序嵌入到 UWP 应用程序中

c# - ASCII + Numpad 组合为 power 10

javascript - 确定两个圆相交的点和 Angular 。

c# - 在多语言计算机中检测当前键盘语言/布局名称

c# - Entity Framework 编译查询容器?

javascript - 在圆形路径周围放置不同大小的圆圈,没有间隙