Dual cursors are useful for picking relative measurements off of a plot; for instance - calculate the period of a time series, or the relative amplitude of two frequencies. A picture's worth a thousand words, so take a peek.
- Basic syntax: dualcursor on / dualcursor off
- Extended syntax supports a high level of control
- Works with live data streams
- Works in GUIDE guis
- Includes delta calculations (x2-x2, y2-y1)
- Export selected region to a new figure or to the workspace
Michelle Hirsch (2023). dualcursor (https://github.com/michellehirsch/MATLAB-Dual-Cursors), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Versions that use the GitHub default branch cannot be downloaded
Moved code to GitHub. Removed mistaken attribution.
Enhanced support for zoom and pan. If you zoom or pan such that the cursors go off screen, they are automatically brought back in to the visible part of the axis. Good stuff.
Removed hype from description.
A few small feature requests.
A few small updates based on user feedback.
Small fix - now works when the axes is parented to a uipanel, too (I wrote the original back in the day when the figure was the only parent an axes ever had ...)
Enhancement - now works when axes is parented to uipanel.
Now works (hopefully) with plot types that create compound (hggroup) objects, such as stem. Thanks to Ralph Schmidt for pointing out the bug.