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

조회 수: 28 (최근 30일)
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.

답변 (1개)

Neha
Neha 2023년 8월 29일
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
Matt Latourette
Matt Latourette 2023년 8월 29일
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.

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

카테고리

Help CenterFile Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by