How to extract data from drawn images?
조회 수: 3 (최근 30일)
이전 댓글 표시
Like this, I drew a real picture using Simulink.I need the data for the image titled Pulse Response, how should I extract it
댓글 수: 0
답변 (2개)
Sulaymon Eshkabilov
2023년 12월 19일
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
2023년 12월 19일
댓글 수: 4
Image Analyst
2024년 1월 2일
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????
DGM
2024년 1월 3일
편집: DGM
2024년 1월 3일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!