MATLAB Answers

0

how to extract data from 2D graph?

Asked by Safwana Razak on 7 Jan 2019
Latest activity Commented on by Safwana Razak on 8 Jan 2019
Accepted Answer by KSSV
Hi,
I got 2D graph like attacment. how to extract the data from .jpg? i do convert it in .fig but i have error:
"No appropriate method, property, or field 'ZData' for class 'matlab.graphics.primitive.Image'.
Error in test123 (line 12)
z = dataObjs(1).ZData"
Thanks untitled.jpg

  0 Comments

Sign in to comment.

2 Answers

KSSV
Answer by KSSV
on 7 Jan 2019
 Accepted Answer

If you have .fig,,,you can get the handles of the figure and the handles have XData and YData.

  1 Comment

thank you so much

Sign in to comment.


Answer by madhan ravi
on 7 Jan 2019

https://www.mathworks.com/matlabcentral/answers/100687-how-do-i-extract-data-from-matlab-figures#answer_110036 - save your graph as .fig instead of .jpg ("No appropriate method, property, or field 'ZData' for class 'matlab.graphics.primitive.Image'. )

  1 Comment

If i get my graph from report format like pdf or word or .jpg? when i convert into .fig i got the error mgs:
"No appropriate method, property, or field 'ZData' for class 'matlab.graphics.primitive.Image'.
Error in test123 (line 12)
z = dataObjs(1).ZData"

Sign in to comment.