Harmonic Cursors
No License
Uses mouse-click input from user to set the value of the first harmonic, which diplays a line and lines for higher-order harmonics. Displays the value of the harmonics at the top of the axis, just above the axis box.
You can nudge the first harmonic in small increments by using the right mouse button; a right-click to the left of the first harmonic will nudge it left, and vice-versa for the right. (There is a "nudge_factor" that can be adjusted to make the nudge delta larger or smaller for your application.
If you want to remove the cursors, click once to get the crosshairs, and then click off of the axis to the left or right.
EXAMPLES: Can be used simply as a function call after a plot has been generated:
plot(x,y)
harmonic_cursors(gca)
Alternatively, the function can be called from the command line, from another function, or using a callback object by passing the axis handle of the plot as the argument.
A demo is included in the zip file.
Cite As
Jeffrey Daniels (2024). Harmonic Cursors (https://www.mathworks.com/matlabcentral/fileexchange/2982-harmonic-cursors), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Polar Plots >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |