Multiple Cursors

versión (4.71 KB) por Olivier
Cursor feature for MATLAB® plots

2,3K descargas

Actualizada 21 Jun 2007

Ver licencia

MYCURSORS creates as many cursors as you want on an axes.
Cursors can be tricky to implement and handle. This function will help you to simply add multiple cursors on an axes.


Take a look at the example cursor_demo() to see how you can implement cursors using MYCURSORS.


FH = MYCURSORS(VARARGIN) add cursor on an axes.

VARARGIN can contain 0, 1 or 2 elements:
1) First input is the handle of the axes on which you want to create the
Default value is the current axes (GCA)
2) Second input is the color of the cursor.
Default value is red ('r' or [1 0 0])

FH is a structure containing function handles that enable you to manipulate
the cursor. FH structure looks like:
FH.add(XPOS) : Adds a cursor on the same axes at the position x = XPOS.
XPOS is facultative. Default value is the middle of the
axes. : Removes the NUMth cursor created
If NUM is a character string then the function removes only
the last cursor.
FH.val(NUM) : Returns a vector containing the positions of the NUMth
If you omit NUM then the function returns the position of
all cursors.
FH.hdl() : Returns a matrix containing the handles of the cursors in
the first column and the handles of the associated labels
in the second column.

Citar como

Olivier (2022). Multiple Cursors (, MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2007a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!