用matlab启动C#程序 [英] starting C# program with matlab

查看:80
本文介绍了用matlab启动C#程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中有一个正常工作的程序:读取dat.-files,计算很多东西,给出正确的输出文件。没问题。我使静态void main()方法成为一个公共方法 - 并将其保存为DLL。然后我将类库加载到Matlab中并尝试调用主函数



NET.addAssembly('path');



namespace.Class.Main();



但它不起作用。



有什么原因可以解决这个问题吗?或者它只是一个单独的问题(发布整个应用程序会破坏框架)?

I have a program in C# that is working properly: reading in dat.-files, calculating a lot of stuff, giving out correct output files. No problems. I made the static void main() method a public method - and saved it as DLL. Then I loaded the class library into Matlab and tried to call the main function

NET.addAssembly('path');

namespace.Class.Main();

but it didn't work.

Are there any reasons why this CAN'T work? Or is it just an individual problem (to post the whole application would blow the framework here)?

推荐答案

MathWorks文档页面 [ ^ ]建议您必须创建一个。 NET类库,以便在MathLab中使用它。
This MathWorks documentation page[^] suggests you have to create a .NET Class Library, in order to consume it in MathLab.


这篇关于用matlab启动C#程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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