Here is an example of what I think you want to do:
plot(1:10,1:10);
h = gca;
set(h, 'Units', 'Points');
nPos = get(h, 'Position');
nXLen = nPos(3) - nPos(1);
nYLen = nPos(4) - nPos(2);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!