急,问一个数据传递问题。
问一个gui问题,两个axes之间传输数据问题,在一个button控件回调函数显示图像在axes1中,在另外一个button的回调函数中对axes1中的图像进行处理,然后显示在axes2种,以便进行对比,该怎么处理数据的传递呢?急,知道的告知一下。谢谢。回复:(zn_right)急,问一个数据传递问题。
happy老师,帮忙看一下。谢谢了。<BR> 有知道的吗?帮你顶一下 <DIV><FONT color=#ee1169>MY WAY:</FONT><br>function MainFunctionFigure<br>clc<br>close all<br>global handles1 handles2<br>hMainFig=figure('numbertitle','off','menubar','none','units','normalized','tag','hMainFig');<br>set(hMainFig,'units','normalized','position',[.2,.2,.6,.6]);<br>set(hMainFig,'defaultuicontrolfontname','隶书');<br>set(hMainFig,'defaultuicontrolfontsize',13);<br>set(hMainFig,'defaultuicontrolunits','normalized');<br>hPush1=uicontrol(hMainFig,'style','push','string','参数设定',...<br> 'tag','hPush1','position',[.1,.1,.2,.1]);<br>hPush2=uicontrol(hMainFig,'style','push','string','退出程序',...<br> 'tag','hPush2','position',[.6,.1,.2,.1]);<br>hEditShow=uicontrol(hMainFig,'style','edit','unit','normalized',...<br> 'position',[.4,.4,.2,.1],'tag','hEditShow','string','0');<br>set(hPush2,'callback','close all');<br>set(hPush1,'callback','SubFunctionFigure');<br>handles1=guihandles(hMainFig);<br>guidata(hMainFig,handles1);<br><br><br>=====================================================================<br></DIV><DIV>function SubFunctionFigure(handles)<br>global handles1 handles2<br>hParFig=figure('numbertitle','off','menubar','none');<br>hParEdit=uicontrol(hParFig,'style','edit','units','normalized','position',...<br>[.4,.4,.2,.1],'tag','hParEdit','string','12');<br>hParPush3=uicontrol(hParFig,'style','push','string','参数传递','tag',...<br>'hParPush3','units','normalized','position',[.1,.1,.2,.1]);<br>set(hParPush3,'callback',[...<br> 'global handles1 handles2,',...<br> 'set(handles1.hEditShow,''userdata'',get(handles2.hParEdit,''string''));',...<br> 'strPar=get(handles2.hParEdit,''string'');',...<br> 'set(handles1.hEditShow,''string'',strPar);',...<br> 'close gcf,',...<br> ]);<br><br>handles2=guihandles(hParFig);<br>guidata(hParFig,handles2);</DIV>注:存储为两个M文件,运行第一个。虽然不是完全的解决方案,不过图像不图像的无非是矩阵数据的传递,道理一样。
[此贴子已经被作者于2006-6-4 20:01:48编辑过]
<P>支持</P>
回复:(zn_right)急,问一个数据传递问题。
<P><FONT color=#ff0000>zn_right加威望1点,bainhome加威望2点</FONT></P><P>多情清秋<BR>06.6.6</P> <P>二楼的程序看不太明白啊....能不能解释一下,拜托咯</P>
页:
[1]