MATLAB: Mouse click in a particle Swarm optimization

mouse click

Hello, I want ask how put a mouse click to define a point in space with a window size [min1, max1] and [min2, max2]?

Best Answer

ginput() or figure ButtonDownFcn callback that uses get(0,'CurrentPoint')