How to pass a variable from one GUI to other GUI

3 visualizaciones (últimos 30 días)
mohanish
mohanish el 4 de Oct. de 2018
Comentada: Adam Danz el 18 de Oct. de 2018
I am writing code in which I have multiple GUI interlinked with each other. I want a variable data from GUI1 to be used in GUI2. It is basically GMM data from GUI1 that i need to transfer to GUI2. In GUI1 : I have this data.. [d]=gmm_estimate(v (:,no_coeff)',No_of_Gaussians, No_of_iterations);
this generates matrix of coefficients I want this data to used in GUI2.. I want these coefficients to compare with the coefficients of GUI2 How do I call or transfer this data to GUI2?

Respuesta aceptada

Adam Danz
Adam Danz el 4 de Oct. de 2018
  31 comentarios
mohanish
mohanish el 18 de Oct. de 2018
Alright! I got it! I read some documents and figured it out. I am successful in passing the data to my other Gui. Thank you so much for your help Sir!
Adam Danz
Adam Danz el 18 de Oct. de 2018
Nice! Good job.

Iniciar sesión para comentar.

Más respuestas (1)

Stephen23
Stephen23 el 18 de Oct. de 2018
Editada: Stephen23 el 18 de Oct. de 2018
In GUI1, where d is the data that you want to transfer:
setappdata(0,'mydata',d);
IN GUI2:
d = getappdata(0,'mydata');
See:
This might not work for MATLAB versions from R2014b.

Categorías

Más información sobre Maintain or Transition figure-Based Apps 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