且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#调用Matlab函数来计算非线性编程问题吗?

更新时间:2022-04-22 01:05:35

您可以创建MATLAB脚本/函数来求解方程式(我建议您先尝试使用一些示例数据测试函数,然后再尝试调用它来自.NET).准备好之后,您可以按照从C#客户端调用MATLAB软件"示例进行操作,以传递函数所需的变量.另外,您可以使用matlab.execute("command to run your script")来运行文件.
You can create a MATLAB script/function to solve the equation (I would recommend first testing your function with some sample data before you try invoking it from .NET). Once you have that ready, you can follow the "Calling MATLAB Software from a C# Client" example to pass in variables required by your function. Additionally, you would use matlab.execute("command to run your script") to run your file.