How might I build a full UI for a piece of Matlab numerical code? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-09 00:19:24

问题


I am researching building a full UI for a piece of Matlab numerical code. I can of course port the code to another platform and build the UI in the usual suspects (Qt, Java, etc), but it would be much preferable to communicate with the scientists on the project to retain the code in Matlab.

What is the recommended approach here? I found some old (ca 2007) tutorial on building UI for Matlab, but nothing really good. There is also "MATLAB Advanced GUI Development" (Scott T. Smith), which is very on-topic but dates back all the way to 2006.

So what's the modern approach to building a UI for Matlab? What are the recommended references?

The UI aims to provide data visualization as 2D plots, not in strict realtime but under a second, and some minor interactive capabilities (e.g selecting options or click-selecting coordinates).


回答1:


The topic is very broad, it depends also on your time constrains and general knowledge of GUI frameworks like Java Swing. I think there is no one best answer but these links could still help:

Software engineering and patterns in Matlab GUI application?

How can I program a GUI in MATLAB?

how to implement the idea of mvc design in matlab gui's

Software engineering and patterns in Matlab GUI application?

Is the MATLAB gui creator GUIDE as awful as I think? Is there an alternative?

https://stackoverflow.com/questions/4380737/what-books-will-you-recommend-to-read-about-writing-a-gui-programms-in-matlab

Breaking from for loop in MATLAB GUI

MATLAB programming best practices




回答2:


GUIDE is very limited and a pain when used in 'larger' projects. Therefore I suggest to use MATLAB's seamless integration of Java. Undocumented Matlab is an excellent source for Java/MATLAB integration.

Making use of the 'undocumented' areas of MATLAB, a 'dockable' window can be integrated into MATLAB's IDE. Just execute the following code as m-file.

import javax.swing.*;

dt=com.mathworks.mlservices.MatlabDesktopServices.getDesktop;
panel = JPanel();
dt.addClient(panel, 'MyPanel');


来源:https://stackoverflow.com/questions/7708308/how-might-i-build-a-full-ui-for-a-piece-of-matlab-numerical-code

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