Click here to Skip to main content
11,634,568 members (73,242 online)
Click here to Skip to main content

Tagged as

Matlab Delta Cursors

, 14 Feb 2013 CPOL 4.6K 66 2
Rate this:
Please Sign up or sign in to vote.
Delta Cursors For Use In Matlab Figures

Introduction 

Within Matlab Figures, there are no delta data cursors. You have to export the data tips and then do the math yourself. This is a simple solution.

Background

Since Matlab won't create the delta data cursors (data tips), here is a quick fix. This doesn't require much programming. Just adding the file to your path.

Using the code

Just add the file 'figureC.m' to your path. Replace calls to Matlab's built in 'figure' function with calls to 'figureC'. The custom figure will override the datacursormode's 'UpdateFcn' with its own custom function. It will automatically create the delta data cursors when there is more than one data cursor in a figure.

Points of Interest 

This function takes advantage of Matlab's 'UserData' which is embedded in every figure. Within UserData the reference data cursor object is stored. When data cursors update they use the embedded reference cursor object to find the delta and add it to the printout text.

History 

  • Initial release: 2/13/2013.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Seth B Wood
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
Questionhelp Pin
plg_swpu28-Jun-13 16:09
memberplg_swpu28-Jun-13 16:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150728.1 | Last Updated 14 Feb 2013
Article Copyright 2013 by Seth B Wood
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid