You can create a button in MATLAB GUI and assign a callback function to it that simulates a mouse click event. Here's an example code:
main.m441 chars18 lines
This code uses the java.awt.Robot
class to simulate a left mouse button click event when the button is clicked. You can modify it to simulate other mouse events and assign it to any other GUI element you want.
gistlibby LogSnag