I am developing a GUI. I can modify the handles structure (for example handles.variable1 = 2) within callbacks. However I am not able to do the same within an external function. E.g., this does not work:
function [matrix, indexVector] = myFunction(handles)
handles.variable1 = 1;
It is important to note that myFunction does not belong to the GUI callbacks, it is simply a function I have created in another m file. When I call it I can read the handles struture (actually im passing them as a parameter) but when I try to modify them the modification is not recorded.