How to send a result value from one gui to another gui?

1 visualización (últimos 30 días)
Cahaya
Cahaya el 3 de Sept. de 2012
I have 2 gui (say A.fig is main gui and B.fig is the other one). In A.fig i have a button 'Detect' to detect an object in picture (the result is string, like rectangle/square/triangle/circle). And there's a button 'Change' that call and show B.fig.
In B.fig i have a popupmenu, but i want the string in popupmenu was depend on the result from button 'Detect' in A.fig.
For example, if the result from 'detect' button is rectangle, when i click 'change' button and show B.fig, the list of popupmenu is cube and pyramid. If the result is triangle, the list is prism and pyramid; if circle, the list is ball and tube.
And my problem is, how to send the result value from 'detect' button in A.fig to B.fig that i use to determine the list of popupmenu in B.fig??
Need your answer, thank u before..

Respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 3 de Sept. de 2012
%use mat file
%for example x y z your data
save file x y z
%to get your data
data=load('file')
x=data.x
y=data.y
z=data.z
  5 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 3 de Sept. de 2012
then he can add an update button in his second gui. it's not the better way, but it can help
Cahaya
Cahaya el 4 de Sept. de 2012
to Azzi Abdelmalek : so i must save the result in mat file everytime i press the button in A? but how if i don't want to add an update button in my second gui? Can i update automatically when i press the button in A?
to Image Analyst : yes, you right. I want B is update every time i press the button in A. Is it possible?

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 3 de Sept. de 2012
  2 comentarios
Cahaya
Cahaya el 4 de Sept. de 2012
which part is related with my problem?
Walter Roberson
Walter Roberson el 4 de Sept. de 2012
B_handles = guidata(B_figure_handle);
set(B_handles.detect_popup, 'String', {'triangle', 'square'});
guidata(B_figure_handle, B_handles)

Iniciar sesión para comentar.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by