필터 지우기
필터 지우기

How to extract data from drawn images?

조회 수: 3 (최근 30일)
宇兴 齐
宇兴 齐 2023년 12월 19일
편집: DGM 2024년 1월 3일
Like this, I drew a real picture using Simulink.I need the data for the image titled Pulse Response, how should I extract it

답변 (2개)

Sulaymon Eshkabilov
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
  댓글 수: 1
宇兴 齐
宇兴 齐 2024년 1월 2일
I have tried your method before, and my picture was obtained through Simulink. There are many pictures together. Your method should only be applicable to graphs drawn using ordinary methods, right?

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2023년 12월 19일
When you originally created the picture, just save the data at that time to a .MAT file using save.
You can recall it later from the .mat file using load.
  댓글 수: 4
Image Analyst
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
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:
  1. Save the sandwich in the refrigerator
  2. 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 CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by