Do you know how to convert existing graph into coding. I don't have the equations. I have the graph picture in my textbook but i need it to include in my matlab apps
Show older comments
Do you know how to convert existing graph into coding. I don't have the equations. I have the graph picture in my textbook but i need it to include in my matlab apps
For an example for this graph, i have the bundle diameter= 0.6m
I choose split ring floating head, and the MALTAB app designer can calculate the shell inside diameter. So if we do it manually i will get the value of 62 mm.

Answers (1)
John D'Errico
on 31 Oct 2023
1 vote
I'm sorry. There is no magic way to know the formula of a given graph in a textbook. And no magic way to just turn that graph into a formula, after copying the image into MATLAB. (Yes, you could do things, but that would take some image processing expertise on your part.)
However, nothing stops you from taking individual points off that curve. You already did that once. Then you can type the values you get into MATLAB, as a pair of vectors with multiple points in each. Finally call polyfit. A linear or at worst, a quadratic polynomial would seem to suffice here. Then use the resulting polynomial in your code.
5 Comments
Image Analyst
on 31 Oct 2023
@Subathra Nilamegan if the graph is in your textbook, it seems reasonable that they would have told you about it, namely the formula for the curves/lines that are plotted. Did they?
Walter Roberson
on 31 Oct 2023
Search the File Exchange for tag:digitize to find functions that can help convert the image into data. However the image will need to be processed to remove the grid. I suggest that you put a straight edge against the graph to check if the lines are simple straight lines like they appear to be.
Subathra Nilamegan
on 9 Nov 2023
Subathra Nilamegan
on 9 Nov 2023
Subathra Nilamegan
on 9 Nov 2023
Categories
Find more on MATLAB 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!