MATLAB: How to extract data to table or matrix from .fig which has cell type data

Hi,
I want to extract data from a figure (.fig format). I do:
open('EstimatedSNR_Range.fig');
h = findobj(gca,'Type','line');
x=get(h,'Xdata');
y=get(h,'Ydata');
X2=cell2mat(x);
==>Error using cat Dimensions of matrices being concatenated are not consistent.
Error in cell2mat (line 84) m{n} = cat(1,c{:,n});
X2=cell2table(x); ==>Undefined function 'cell2table' for input arguments of type 'cell'.
I attached how the x and y look.

Best Answer

x and y are double vectors when you return them with get, not cell.
There's no need for cell2mat as the error is telling you.
Use
which x
to verify.
ADDENDUM: This is really not true; see follow-on comments that get the right answer. The above was based on an assumption that the handle was a single value, not a vector.