如何更改 MATLAB GUIDE 图回调文件名?
MATLAB GUIDE 是在 MATLAB 中进行 GUI 编程的实用程序。
如果设计一个名为 myfigure
的图窗,它会创建两个文件 myfigure.fig
(其中包含 GUI 布局描述)和 myfigure.m
(其中包含回调)描述 GUI 背后的逻辑(例如,当您单击按钮时,将调用某个函数,并且 .m 文件旨在包含此类回调函数的代码)。
如何将 myfigure.m
的名称更改为 myfigure_callbacks.m
并且仍将 myfigure_callbacks.m
中的函数与 GUI 中描述的绑定myfigure.fig
?
所以我想要名为
myfigure.fig
和 myfigure_callbacks.m
的文件,而不是
myfigure.fig
和 myfigure.m
>
MATLAB GUIDE is a utility for GUI programming in MATLAB.
If designing a figure named myfigure
it creates two files myfigure.fig
, which contains the GUI layout description, and myfigure.m
which contains the callbacks describing the logic behind the GUI (e.g. when you click a button, a certain function is being called, and the .m file is intended to contain codes of such callback functions).
How can I change the name of myfigure.m
to myfigure_callbacks.m
and still have the functions in myfigure_callbacks.m
bound with the GUI described at myfigure.fig
?
So I want to have files named
myfigure.fig
and myfigure_callbacks.m
instead of
myfigure.fig
and myfigure.m
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据文档,这是无法完成的。
以下是 Mathworks 的文档:命名 GUI 及其文件。
编辑:
正如您所观察到的,重命名 GUI 的目的是重命名关联的Fig 和代码文件(自动)。
According to the documentation this cannot be done.
Here's the documentation from Mathworks: Name a GUI and Its Files.
Edit:
As you observed, renaming the GUI is intended to rename associated FIG and code files (automatically).