I am trying to extract data from the MATLAB figure named "NF power_Aulayers_etch_glass-by-glass_xz" as attached. But, when I run the code, it doesn't extract the data, rather it shows "Improper index matrix reference" this message. So, how do I resolve the error and extract data from the figure?
fig = openfig('NF power_Aulayers_etch_glass-by-glass_xz.fig');
Extracted_data = findobj(fig,'-property','XData','-property','YData','-property','Zdata');
x = Extracted_data(1).XData;
y = Extracted_data(1).YData;
z = Extracted_data(1).ZData;