If you are referring to resetting an object's position in a Matlab GUI, you can use the following code assuming you have a handle to the object:
set(objectHandle, 'Position', [x, y, width, height]);
Here, 'x' and 'y' represent the starting coordinates for the object and 'width' and 'height' represent the size of the object. You can set these values to the original starting position and size of the object to reset it.
If you are referring to resetting a variable to its original value, you will need to store its original value before making any changes. You can then assign the original value back to the variable when you want to return it to its starting position.
For example:
originalValue = 5; % store the original value myVar = 7; % make changes to myVar myVar = originalValue; % assign the original value back to myVar to return it to its starting position.
gistlibby LogSnag