Too many input arguments error in executable.
Mostra commenti meno recenti
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.
Risposte (1)
Walter Roberson
il 25 Giu 2018
0 voti
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.
Categorie
Scopri di più su MATLAB Compiler in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!