Is it possible to embed MATLAB figures in a modern .Net user interface such as WinUI, WPF, or MAUI?

22 Ansichten (letzte 30 Tage)
I'd like to create the user interface for my application using one of the modern .Net UI frameworks such as WinUI, WPF, or MAUI but still use MATLAB functions such as plot, histogram, and imshow for data visualization, ginput for interaction, etc. I know that it's possible using the Compiler SDK to call MATLAB from .Net and have it display images and plots, but what I'd really like to do is display those images and plots embedded in the .Net-based UI, rather than have them pop up as separate windows. Can this be done? If so, how?
I saw one very old StackOverflow post about doing this in a WinForms app (c# - how to plot matlab figure inside winform application? - Stack Overflow) but nothing more recent about doing it with one of the modern UI frameworks.

Antworten (1)

Neha
Neha am 29 Aug. 2023
Hi Matt,
I understand that you want to display MATLAB images and plots embedded in a .NET-based UI. Currently this feature is not supported, a possible workaround is explained here: Can I embed a MATLAB GUI in a .NET Windows Form with MATLAB Builder NE 3.0.1 (R2009a)? - MATLAB Answers - MATLAB Central (mathworks.com)
Hope this helps!
  1 Kommentar
Matt Latourette
Matt Latourette am 29 Aug. 2023
Is this something that MathWorks is working on? One of the key reasons to use the Compiler SDK (formerly Builder NE) toolbox is because you've developed a MATLAB application that has outgrown the MATLAB GUI tools. For example, you want to deploy it in a professional setting where it needs to share the look and feel users expect on Windows. Alternately, once a MATLAB application reaches a certain size, continuing to develop the application's GUI with the MATLAB tools becomes a hindrance. Plots are the part of the GUI that is easiest to develop in MATLAB, but the .NET framework is much easier to work with for creating everything else (i.e. text boxes, radio buttons, push buttons, tabs, toolbars, etc.) in a way that looks professional without having to write an excessive amount of boilerplate. You don't want to rewrite your number crunching back end code in .NET, but there is considerable value in giving the front end of a MATLAB app a facelift with a modern .NET GUI.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB Compiler SDK finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by