This feature is not available in MATLAB 7.9 (R2009b).
However, there are some possible techniques that you can use to implement this feature in a GUI. Since this is not a standard feature, this techniques should be implemented inside the GUI callbacks and therefore require an additional programming effort.
The main concept is to basically track the operations that you do in each callback in a container. This container can be a cell array or for example an external script MATLAB-file (.m).
Please consider the simple example attached to this solution.
This simple GUI has two edit text sections where you can enter two numbers and a button to sum and display the value. In each callback in gui.m you should be able to see a final callback section that is commented as "% File tasks". In this area there are instructions to write to an external file the commands contained in the callback itself. This means that for each callback you have to identify what commands should be written to the "macro" file. In this case for example the values used in the text box are recorded and to stored then the macro won't check for a new value when used but will use the older one. The reset button is nothing more than a way to reset all the macro instructions and the use macro button just execute what's inside the MATLAB-file that has been created.
As you can see this could not be a general solution and is strictly dependent on what operation is your GUI doing and what you would like to track in the macro.
Best Answer