在Matlab中从C#调用可执行文件
问题描述:
嗨社区,
i希望你能帮助我。
我的问题:
我在C#编写了一个代码,它只是我的matlab工作的一部分,因为我在MAtlab中创建了一个工具箱。
代码用于远程控制一个装置。实时要求没有在Matlab中实现,所以我应该用C#编写我的代码。
然而,我想知道,如果有可能的话将C#代码集成到Matlab中我该怎么做?
thx。
Hi Community,
i just hope you can help me.
My Problem:
I wrote a code in C# and it''s just a part of my matlab Work,because i am creating a Toolbox in MAtlab.
The code is for a remote Control of a Device. The real-time requirements were not fulfilled in Matlab, so I should write my code in C#.
Yet,i want to know,if it''s possible to integrate a C# code into Matlab and how can i to this?
thx .
答
-SA
这是如何:
Here is how:
system(programFileName)
我必须注意到它可能不是个好主意。这是一个单独的过程;并且流程是完全隔离的,因此流程之间协作的可能性非常有限,除非它们是通过某些IPC机制专门为此设计的。
我的答案1非常正式,只是因为你问过它,但你的问题是基于误解。我试图解释它不会真的有用。 你问题的最后一段更有意义。仔细看看你的问题后,我会回答:
请参阅 http://www.mathworks.com/matlabcentral/fileexchange/12987-integrating-matlab-with -c [ ^ ]。
请参阅我对该问题的评论;或许对你回答你的问题更重要。 :-)-SA
My Answer 1 was quite formal, only because you asked about it, but your question was based on misconception. I tried to explain that it won''t be really helpful. The last paragraph of your question makes much more sense. After closer look at your question, I''ll answer:
Please see http://www.mathworks.com/matlabcentral/fileexchange/12987-integrating-matlab-with-c[^].
Please see my comment to the question; perhaps it is much more important for you then answering your question. :-)—SA