【发布时间】:2011-09-16 13:44:36
【问题描述】:
我有一个 block.fig 文件,它封装了我的图形用户界面 (GUI) 的一些块。
我想创建一个full.fig 文件,它使用封装在block.fig 中的该GUI 的许多实例。
我该怎么做?
【问题讨论】:
标签: matlab hierarchy figure matlab-guide
我有一个 block.fig 文件,它封装了我的图形用户界面 (GUI) 的一些块。
我想创建一个full.fig 文件,它使用封装在block.fig 中的该GUI 的许多实例。
我该怎么做?
【问题讨论】:
标签: matlab hierarchy figure matlab-guide
您不太清楚以下是否适用,但也许您可以通过从加载的图形中选择组件(带有FINDOBJ)并将它们复制/移动到新图形来调整this answer 以适应类似的问题.
一个简单的例子:
%# create and save block.fig
plot(1:10)
uicontrol('style','text','string','hello')
hgsave('block.fig')
close all
%# create new figure, load saved .fig
hFig = hgload('block.fig');
h = figure;
%# copy the components you want (also think of using the 'Tag' property)
copyobj(findobj(hFig,'type','uicontrol'), h)
%# delete loaded .fig
delete(hFig)
【讨论】: