How to host a MATLAB instance in WPF Host

10 visualizzazioni (ultimi 30 giorni)
Michael
Michael il 27 Feb 2014
Commentato: Michael il 27 Feb 2014
Hello,
I want to integrate MATLAB into a C# WPF application. I've searched Google as much as I can and discovered, it's one thing if we've got some calculations, it might be doable.
However, we've got a case where our R&D team has a strong investment of time and effort maintaining not only calculations, but also an extensive user interface.
We want to integrate that piece through WPF with other non-MATLAB features, coordinated through a WPF hosting interface of sorts.
I know WPF can host 32-bit WinForms and such for things like painting, intercept and/or relay mouse and keyboard events and such. Is something like this doable integrating a MATLAB UI in a WPF host?
At first blush it seems the MATLAB environment wants to be in the driver's seat, not unlike T&M environments such as LabView. I could be wrong about that, but I'm a .NET guy, not a MATLAB guy.
Would someone advise?
Thank ye...

Risposte (3)

Walter Roberson
Walter Roberson il 27 Feb 2014
You can use MATLAB in "automation mode", and you can invoke the MATLAB Engine via .NET interfaces.
  1 Commento
Michael
Michael il 27 Feb 2014
This is likely at least part of the answer, or at least worth a look. I'm not sure it's the answer, as we're exploring and navigating our options.

Accedi per commentare.


Michael
Michael il 27 Feb 2014
Modificato: Michael il 27 Feb 2014
Yep. I know COM, COM Interop integration with a .NET application.
Are there any samples, per se, a "Hello World" (?), demonstrating mouse and keyboard event interception, how to handle screen refresh issues, etc? We could spike one of our own I suppose as a proof of concept.
Assumption: we would be taking a MATLAB licensing hit when we deploy the WPF application to client machines?

Michael
Michael il 27 Feb 2014
Another question there: if the MATLAB folks provide a .NET assembly, via the MATLAB Builder NE, this could expose the UI into our larger WPF app? TBD how to interact with it, cause it to receive keyboard and mouse events, refresh screen, etc.

Community Treasure Hunt

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

Start Hunting!

Translated by