参考链接
https://ww2.mathworks.cn/matlabcentral/answers/12987-how-to-save-a-matlab-graphic-in-a-right-size-pdf
代码示例
h = figure;
plot(1:10);
set(h,'Units','Inches');
pos = get(h,'Position');
set(h,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)])
print(h,'filename','-dpdf','-r0')