C#相当于Excel的TINV功能 [英] C# equivalent of Excel's TINV function

查看:222
本文介绍了C#相当于Excel的TINV功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一些代码从Microsoft Excel移植到C#。 Excel表达式使用 TINV 功能。 C#或.NET中是否有等效的功能?如果没有,需要什么C#代码重新实现这个函数?

解决方案

如果你使用的是.NET 4.0,你可以利用图表在System.Web.DataVisualization程序集中找到类(您还需要添加System.Web)。 E.G:

  var chart = new System.Web.UI.DataVisualization.Charting.Chart(); 
double result = chart.DataManipulator.Statistics.InverseTDistribution(.05,15);

//2.131449546

文档:



http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.statisticformula.inversetdistribution(v = vs.110).aspx


I am porting over some code from Microsoft Excel to C#. The Excel expression uses the TINV function. Is there an equivalent function in C# or .NET? If not, what C# code is necessary to reimplement this function?

解决方案

If you are using .NET 4.0 you can leverage the Chart class found in the System.Web.DataVisualization assembly (you will also need to add System.Web). E.G:

var chart = new System.Web.UI.DataVisualization.Charting.Chart();
double result = chart.DataManipulator.Statistics.InverseTDistribution(.05, 15);

//2.131449546

Documentation:

http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.statisticformula.inversetdistribution(v=vs.110).aspx

这篇关于C#相当于Excel的TINV功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆