Too many input arguments error in executable.
이전 댓글 표시
I compiled an .exe based on a function that I set in matlab. The executable runs normally when I execute it myself, but it informs the error 'Too many input arguments' when an external program tries to call it.
답변 (1개)
Walter Roberson
2018년 6월 25일
0 개 추천
Remember that when a compiled MATLAB function is invoked, every space-delimited string is (typically) passed as a different argument. If the calling sequence is not careful, that can cause filenames that have spaces in them to be split into multiple arguments.
Remember too that what reaches your function arguments is character vectors, never actual numbers.
You should redefine your function to add varargin at the end of the argument list, and then if the number of arguments is not what you expect, produce an error message that helps debug the problem by displaying the argument list with boundaries between the pieces.
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!