將我的matlab圖形打印到PDF中有問題。在研究了幾個小時的解決方案後,我一直無法找到解決方案。我不斷收到相同的錯誤消息。我感謝您的幫助。在Matlab中繪製錯誤
x = [2 4 7 2 4 5 2 5 1 4];
fig=plot(x);
print(fig,'-dpdf')
Error using
checkArgsForHandleToPrint>LocalCheckHandles
(line 88)
MATLAB Graphics handle must be a figure.
Error in checkArgsForHandleToPrint (line 30)
Error in print>LocalCreatePrintJob (line 336)
handles = checkArgsForHandleToPrint(0,
varargin{:});
Error in print (line 153)
[pj, inputargs] =
LocalCreatePrintJob(varargin{:});
第一個輸入應該是*圖形的句柄*,您正在將句柄傳遞給* plot *。試試'print(gcf,'-dpdf')'打印當前的數字 – Suever