c# - 如何通过 ilnumerics 获得 Moore-Penrose 广义逆

标签 c# ilnumerics

是否有可能通过 ilnumerics 得到矩阵 A 的 Moore-Penrose 广义逆pinv 在 ilnumerics 中是什么意思? pinv 表示逆矩阵?

最佳答案

是的,使用 ILNumerics 是可能的!

这是一个注释示例:

// Matrix A
ILArray<double> A = new double[,] { { 1, 2 }, { 3, 4 } };

// The Moore-Penrose pseudoinverse
ILArray<double> Ainv = pinv(A);

// Check for: A * A^-1 = I
ILArray<double> AtimesAinv = multiply(A, Ainv);

// difference of I = eye(2,2) - the inverse
ILArray<double> diff = eye(2, 2) - AtimesAinv;

// max norm of the difference
double normalized = (double)norm(diff)[0];

// Arbitrary epsilon to make the comparison
double epsilon = 1e-10;
Assert.AreEqual(true, normalized <= epsilon);

请查看以下链接中的文档以获取更多信息:ILNumerics API Doc - pinv .

关于c# - 如何通过 ilnumerics 获得 Moore-Penrose 广义逆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28036641/

相关文章:

c# - 调试启动时 IISExpress 崩溃

c# - 如何在 C# 中为 SafariDriver 设置 CleanSession 功能?

c# - 初学者 ILNumerics : install under VS2012

c# - 插值 3d 表面 ilnumerics

c# - 移动列时 UltraGrid VisiblePosition 不会改变

c# - 如何使用发送键将 Ctrl+Shift+F1 发送到应用程序

C#:向项目添加启动画面的理想方法是什么?

C# 使用 ILnumerics 在 3d 中绘图

plot - 如何在 ILNumerics 中有效地绘制大表面(例如 1000x1000)?

c# - 使用 python/Matplotlib 在 GUI 中进行 3D 绘图还是在 C#/illnumerics 中进行 3D 绘图?