I want to extract data from a lot of graph fig files. My data are consist of scattered points in a graph. I used the code below however there is nothing in the x and y variables. How to fix this?
clcclear alladdpath(genpath('PIV TEST 2'))for k = 2:21 h = openfig(sprintf('%d.fig',k)); h = findobj(gca,'Type','line'); x = get(h,sprintf( 'XData',k)); y = get(h, sprintf('YData',k));end
Is there anything wrong in my coding?
Best Answer