The present code is a Matlab function that provides interactive selection of a data section from a 2-D plot using vertical mark lines. The function is very suitable for GUI developments. The user can position each of the two vertical mark lines in an interactive mode, using the mouse. After that, one must press any keyboard key in order to receive their abscissa values. The output of the function is a 1-by-2 vector with the section start and end values, in abscissa data units.
An example is given in order to clarify the usage of the function. For convenience, the input and output arguments are given in the beginning of the function.
A new version of the code has been uploaded.
Inspired by: Moveit2 - Move a graphical object with the mouse.