What does this Error code mean ?
조회 수: 20 (최근 30일)
이전 댓글 표시
Error using checkArgsForHandleToPrint
Handle input argument contains nonhandle values.
Error in checkArgsForHandleToPrint
Error in print>LocalCreatePrintJob (line 100)
handles = checkArgsForHandleToPrint(0, varargin{:});
Error in print (line 38)
[pj, inputargs] = LocalCreatePrintJob(varargin{:});
Error in saveas (line 181)
print( h, name, ['-d' dev{i}] )
Error in S_1 (line 200)
saveas(gcf, cell2mat(fileName),'jpg');
Error in MainScript (line 21)
S_1; clearvars;
댓글 수: 0
답변 (1개)
per isakson
2018년 5월 24일
편집: per isakson
2018년 5월 24일
Deep in the code of Matlab itself
Handle input argument contains non handle values
a nonhandle value was passed where a handle was expected. That in turn was caused by
Error in S_1 (line 200)
saveas(gcf, cell2mat(fileName),'jpg');
a saveas in your function, S_1, at line 200. Put a breakpoint at saveas and run the code. At the breakpoint inspect the values that are passed to saveas
K>> h = gcf
h =
Figure (1) with properties:
Number: 1
Name: ''
Color: [0.9400 0.9400 0.9400]
Position: [680 678 560 420]
Units: 'pixels'
Show all properties
K>>
et cetera
댓글 수: 2
per isakson
2018년 5월 24일
편집: per isakson
2018년 5월 24일
Set
dbstop if error
start a batch and at the "break" (when the error is about to occur) inspect the input values of saveas
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!