【发布时间】:2015-08-27 20:29:52
【问题描述】:
请原谅我的菜鸟,但这是我的第一篇文章。
我在 matlab 中生成了这个 gui,我想通过更新函数在其中一个轴上绘制图像。
我知道在 Matlab 中你可以做类似的事情
图片(图片) 坚持,稍等 情节(x1,z1) 等一下
但是如何使用 gui 来做到这一点?
这里是更新函数的一部分
%get a handle to the GUI's 'current state' window
deflectionx = findobj('Tag','deflectionx_display');
deflectiony = findobj('Tag','deflectiony_display');
depth = findobj('Tag','depth_display');
Graph = findobj('Tag','Graphical_display');
UltraS = findobj('Tag','UltraS_image');
%update the gui
set(deflectionx,'String',x_def);
set(deflectiony,'String',y_def);
set(depth,'String',insert_depth);
%% above works fine. below does not
%i want this to plot those points on top of the image in the large graph panel of the gui
plot(Graph,img1)
hold on
plot(Graph,x1,z1);
hold off
%this should plot the second image on the UltraS panel
plot(UltraS,img2)
请提前致谢!
【问题讨论】:
-
怎么不行??什么都没有显示?显示的内容有误?
-
底部不起作用,顶部,提取从函数接收的数据并使用标签“deflectionx”、“deflectiony”、“深度”更新 gui。我认为这是因为我只是更改了字符串的值。Graph 和 UltraS 变量引用了我的 gui 的两个图。没有显示任何内容。
标签: image matlab user-interface graph plot