From: Luis Lacerda on 21 Jul 2010 05:03 Dear Steve, First of all thank you for you reply. What do you mean by > > In order to change the "master" copy of the handles structure for the main > GUI, YOU NEED TO MODIFY THE CONTENTS OF THAT VARIABLE and then use GUIDATA > to update the master copy. The second of those steps is the one that people > forget to do frequently. > Thank you in advance, once again. Luis
From: Steven_Lord on 21 Jul 2010 09:54 "Luis Lacerda" <luislacerda1989(a)hotmail.com> wrote in message news:i26d48$kam$1(a)fred.mathworks.com... > Dear Steve, > > First of all thank you for you reply. > > What do you mean by >> >> In order to change the "master" copy of the handles structure for the >> main GUI, YOU NEED TO MODIFY THE CONTENTS OF THAT VARIABLE and then use >> GUIDATA to update the master copy. The second of those steps is the one >> that people forget to do frequently. If you obtain a copy of the "master" copy of the handles structure for your main GUI and modify that copy in your function, but don't use GUIDATA to update the master copy with your changes, the changes go away when the function exits, as does anything else in the function workspace (it's a _little_ more complicated than that, but that's good enough for this description.) -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Luis Lacerda on 27 Jul 2010 09:43 Dear Steve, I've still been struggling with the suplots.. I'll try to explain it better: I have a GUI (named simulmain) that calls another one (kfilter) by a push button. In the simulmain m file i wrote: function filter_Callback(hObject, eventdata, handles) kfilter('simulmain', handles.figure1); this statement passes a propertie named simulmain with the handles to this figure. In the guide file, i have created an object axes called mainaxes, and i displayed it's creatFCn in the simulmain m file. When the kfilter GUI appears i want it to subplot someting in the simulmain GUI, from another push button.. Next i present the code for this callback: function halfCol_Callback(hObject, eventdata, handles) subplot(2,2,1,'Position',[0.05 0.59 0.33 0.335]),imagesc(squeeze(imgslice(handles.slc))); axis off title('Image(Unmodified K-space)') My purpose is to do this suplot directly in the simulmain GUI over what is displayed in it. I have read what you wrote, about the axes function but i don't know how to use it.. Can you please help me? Luis
From: Steven_Lord on 27 Jul 2010 12:41 "Luis Lacerda" <luislacerda1989(a)hotmail.com> wrote in message news:i2mnpu$nhb$1(a)fred.mathworks.com... > Dear Steve, > > I've still been struggling with the suplots.. > > I'll try to explain it better: > > I have a GUI (named simulmain) that calls another one (kfilter) by a push > button. In the simulmain m file i wrote: > > > function filter_Callback(hObject, eventdata, handles) > > kfilter('simulmain', handles.figure1); this statement passes a propertie > named simulmain with the handles to this figure. > > In the guide file, i have created an object axes called mainaxes, and i > displayed it's creatFCn in the simulmain m file. > > When the kfilter GUI appears i want it to subplot someting in the > simulmain GUI, from another push button.. Next i present the code for this > callback: > > > function halfCol_Callback(hObject, eventdata, handles) > > subplot(2,2,1,'Position',[0.05 0.59 0.33 > 0.335]),imagesc(squeeze(imgslice(handles.slc))); axis off > title('Image(Unmodified K-space)') > > My purpose is to do this suplot directly in the simulmain GUI over what is > displayed in it. I have read what you wrote, about the axes function but i > don't know how to use it.. If you already have an axes in your simulmain GUI (which I suspect you do, or should) then you do NOT want to call SUBPLOT to create a _new_ axes; you simply want to plot into the _existing_ axes. If so, look at the help for IMAGESC (well, actually the help for IMAGE, to which IMAGESC's help points.) There's a syntax that lets you pass the handle of the axes into which you want to plot as the first input, isn't there? Use that syntax with the handle of the axes into which you want to plot as the input. You can obtain the handle of this axes given the handle of the main GUI using either the handles structure or a FINDOBJ or FINDALL call. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
First
|
Prev
|
Pages: 1 2 Prev: An exact simplification challenge - 95 (EllipticF/Pi) Next: voice morphing |