How to output data to the workspace from a GUI that is initiated by another GUI
    1 visualización (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I have two separate GUI's (created in GUIDE), I'll call them GUI1 and GUI2. When GUI1 is done running, it will open GUI2 (and pass some data to it) and close GUI1. Within GUI2 the user then makes a lot of modifications to the data. Once the user is done and exits out of GUI2, I want the data to be exported to the workspace. Since GUI2 is not called in the command window and the function from which it's called is already closed, I don't know of any way to do that. My current output function simply looks like this:
% --- Outputs from this function are returned to the command line.
function varargout = GeoFormDraft_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.param;
varargout{2} = handles.compList.String;
varargout{3} = handles.tagDef;
varargout{4} = handles.geomDef;
varargout{5} = handles.controls;
varargout{6} = handles.connDef;
varargout{7} = handles.jncDef;
1 comentario
  Stephen23
      
      
 el 17 de Nov. de 2017
				@ Konstantin Gulin: spamming variables from one workspace into another is usually not a very good way to write efficient, reliable code. You might want to read this:
Respuestas (0)
Ver también
Categorías
				Más información sobre Workspace Variables and MAT Files 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!

