Matlab and .NET 4.0 data communication

孤街醉人 提交于 2019-11-30 15:31:17

First of all, judging by your question, I guess you know about Matlab builder NE. It allows you to deploy a .NET DLL. If you don't know, try it.

Regarding your options:

1) You can pass a .NET object to your Matlab code that will serve as a communications means. Create a new instance of this class, and send to your Matlab code as input. The Matlab code will call the UpdateGui logic with each iteraion. The following example is in C#

 class GuiUpdater{
      public void UpdateGui(int param1,int param2){
           //Do update logic here.
      }
 } 

2) Compile your DLL as COM (It is also possible in Matlab Builder NE), and use COM communication.
3) Use the filesystem as communication means. Write to a file in Matlab, and read it in .NET.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!