Store a vector in one function and access it from another function in Appdesigner.
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    zeytun
 el 18 de En. de 2021
  
    
    
    
    
    Comentada: zeytun
 el 18 de En. de 2021
            I have a 1x40001 size vector "I" in one function that is calculated using a Gaussian distribution. I need to store this in memory and recall it in another function. In the old GUIDE it would have probably been something like this:
% --- Executes on button press in pushbutton4.
function pushbutton1_Callback(hObject, eventdata, handles)
    ... I = "Gaussian function" ...
    handles.I = I;   % store vector in handles
    guidata(hObject, handles);   % save handles
end
function pushbutton2_Callback(hObject, eventdata, handles)
    I = handles.I; % get vector from handles
    ...
end
But in Appdesigner a simple line
app.I = I;
 is not working for storing.
Do I need to create an Edit Field Callback and store the vector value in it or there is a simpler solution?
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
				Más información sobre Desktop 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!

