Real time communication and debugging between Matlab and Visual Studio C# .NET

조회 수: 2 (최근 30일)
Adam Csigo
Adam Csigo 2014년 10월 21일
댓글: Vikas 2022년 6월 6일
Hello,
we would like to create communication with debugging possibilities between Matlab and C# Visual Studio. The following example illustrates our goal:
What we would like to do:
  1. .Net calls a Matlab .m script (which is active in Matlab Editor and contains break points)
  2. Inside this running .m script, Matlab calls back to the .Net application
  3. .Net application returns a non static value
  4. Matlab returns the result
What we have already tried:
  1. We have achieved this two-way communication with deploying our Matlab script to .Net Assembly (with Matlab NE Builder). This assembly was included to the .Net application. Unfortunately debugging is not possible this way.
  2. We tried to create COM Matlab object on .NET Side, in order to execute functions in Matlab. However we did not find any possible way to call the same instance of the .NET Application back from Matlab. We also tried this solution in hopes of debugging possibilites.
Any help, comments, suggestions would be appreciated. Thank you very much in advance.

답변 (1개)

Manda Pavan kumar
Manda Pavan kumar 2022년 1월 27일
Hi Have u found a solution as I am also trying to do this kind of thing but i am. Unable to do so.. Can u help me with it?
  댓글 수: 1
Vikas
Vikas 2022년 6월 6일
I will suggest you to debug each step in Visual Studio
By calling matlab script in VS you can easily debug it's output and C# code output also.
If you are new to C#/VS you can check this guide
As Visual Studio debugging is excellent, you can view output of each line of executed code.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Application Deployment에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by