Borrar filtros
Borrar filtros

Transferring values from one gui to another gui

1 visualización (últimos 30 días)
Sudeep
Sudeep el 30 de Mayo de 2013
I have two gui matlab files. I have to first call the second gui file by pressing a push button so that i enter the second gui matlab file. then perform so work in the second file and then transfer the values from the second gui file to the first gui matlab file, so that i can use this values in my first gui file..
How can i do this????
  1 comentario
David Sanchez
David Sanchez el 30 de Mayo de 2013
use global variables.
after every function heading, add
global my_var
Where my_var is the variable to be used among functions/GUIs. You'll have access to the data from within your functions/GUIs

Iniciar sesión para comentar.

Respuestas (1)

Iain
Iain el 30 de Mayo de 2013
You can pass values around using get, set and using known handles. - get(handle,'children') and get(handle,'parent') can let you get all the handles, and intelligent use can get you the handle you need,if it is not in memory.
You can put variables in the base workspace using "evalin" or "assignin"
You can use global variables.
You can write the values to a file and then load that file.
Figure out your requirement more clearly and then select the method you want.

Categorías

Más información sobre App Building en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by