Extract data from figure files not working in 2017a

1 Ansicht (letzte 30 Tage)
SUHANYA M S
SUHANYA M S am 22 Mär. 2022
Kommentiert: SUHANYA M S am 23 Mär. 2022
I was able to extract data from .fig files until last week using the Figure Property editor and various solutions given on this platform. Today the code I was using doesn't work any more. I've tried many ways and solutions given. Also, looks like the data is not copy-able any more from the Line Property Editor. Has there been some update which disables data access?
Please help!

Antworten (1)

Elif Ozkan
Elif Ozkan am 22 Mär. 2022
Hi,
If i understood correctly, you have .fig files and want to have x and y axis data on your workspace. If you don't try the below code, I suggest.
fig = gcf;
axObjs = fig.Graph
dataObjs = axObjs.Graph
x = dataObjs(1).XData % x axis data
y = dataObjs(1).YData % y axis data
  2 Kommentare
SUHANYA M S
SUHANYA M S am 23 Mär. 2022
Thanks for the response! I tried it and got the following error:
No appropriate method, property, or field 'Graph' for class 'matlab.ui.Figure'.
SUHANYA M S
SUHANYA M S am 23 Mär. 2022
Please note : The figure was obtained from Simulink block of Wind Turbine.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Produkte


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by