C#中的eMatlab评估函数 [英] eMatlab eval function in C#

查看:117
本文介绍了C#中的eMatlab评估函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在用C#解决一些数值分析问题.
Matlab中是否有任何类似于eval()的C#实现函数?
因此,用户在文本框中键入要评估的函数,然后
eval(String s,double x)使用参数x评估该函数的值.
例如,如果用户想对x = 6求函数y = x * x + 6 * x + 12 + sin(90),则
eval("sin(x)+ x * x + 6 * x + 12",6)返回此函数结果的双精度值-85.

感谢您的帮助.

在此先感谢

Hi to all,

I''m solving some numerical analiyse problems in C#.
Is there any C# implemented function similar to eval() in Matlab?
So, user type the function that he wants to evaluate in text box, and
eval(String s, double x) evaluate value of that function with argument x.
For example, if user wants to evaluate function y=x*x+6*x+12+sin(90) for x=6,
eval("sin(x)+x*x+6*x+12", 6) returns double value of result of this function - 85.

I appreciate any kind of help.

Thanks in advance

推荐答案

您在这里得到了答案:

http://www.daniweb.com/forums/thread273258.html [
You got an answer here:

http://www.daniweb.com/forums/thread273258.html[^]


这篇关于C#中的eMatlab评估函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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