How to extract data from drawn images?
Show older comments

Like this, I drew a real picture using Simulink.I need the data for the image titled Pulse Response, how should I extract it
Answers (2)
If you have a MATLAB figure, that can be used for data extraction, e.g.:
figure('Name', 'Original plot')
open('SIM.fig') % Load Figure
% Get the handle of the loaded/read Figure
OUT=get(gca,'Children');
X=get(OUT,'XData'); % X axis data
Y=get(OUT,'YData'); % Y axis data
Data=[transpose(X) transpose(Y)]; % Store the read X and Y data
% Verify
figure('Name', 'Imported Data plot')
plot(X, Y, 'bs-'), grid on; axis tight
Image Analyst
on 19 Dec 2023
0 votes
4 Comments
宇兴 齐
on 2 Jan 2024
宇兴 齐
on 2 Jan 2024
Image Analyst
on 2 Jan 2024
Why not? Why did you not take my suggestion to save the data in a .MAT file? You plotted the data, so you have the data. Why will you not save it in a .mat file????
Say you're eating a sandwich. The sandwich is delicious, but it's too much to eat right now. You decide to save it for later. Do you:
- Save the sandwich in the refrigerator
- Take a photograph of the sandwich and then throw the sandwich away
A captured plot is an imperfect visualization of data. A plot is not a store of data. If you want to operate on the data, operate on the data, not a screenshot of a graph.
Can you estimate the data from a screenshot of a graph? Yes, sometimes. The accuracy depends on the type of graph, how it was constructed, and how it was transported. Working with screenshots as part of the workflow makes your task more complicated and less accurate in ways that are difficult to predict.
I and others have posted plenty of examples of plot transcription. I wouldn't consider any of them to be convenient. It's something that you do when you truly have no control over the source material.
Categories
Find more on Networks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
