calculate a derivative on a graph
Show older comments
what code would i need to answer my question?
3 Comments
Walter Roberson
on 23 Nov 2023
What is our input? Is it an image of a plot ? Is it graphic objects that could be examined to extract their data? Is it the data itself?
Is there a model of the form of the equation, or is it necessary to somehow deduce the equation from the graph ?
Thomas
on 23 Nov 2023
Sulaymon Eshkabilov
on 24 Nov 2023
Is it MATLAB figure object or an image?
Answers (1)
Walter Roberson
on 24 Nov 2023
0 votes
There are two steps:
- First you have to extract x and y data from the graph. If the graph is in the form of an image, then extracting the data by having code analyze the image can be a bit tricky, but there are a number of File Exchange contributions to try to make it easier. If the graph is in the form of MATLAB graphic objects, then you can extract data from those by examining their XData and YData properties. And if you have the x and y data available in the workspace, use that directly.
- Once you have the x and y coordinates, use gradient . Possibly followed with interp1
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!