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.
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 '
'. The custom figure will override the datacursormode's '
' 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.
- Initial release: 2/13/2013.