Application Compiler Syntax in Windows Command Prompt
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I'm using Application Compiler to create a standalone program.
The program I'm trying to pack is
function main(argsin)
if ischar(argsin)
argsin = eval(argsin);
end
[A,B,C]=argsin{:};
processprogram(A,B,C);
end
The idea is to input a series of char including directory, filename and etc. "processprogram" takes these inputs for process. For example, I could run main({'apple.txt','banana','peach'}) in the Matlab Command Window.
Could you please tell me what's the correct syntax in Windows Command Prompt? main apple.txt banana peach ?? I tried many format but couldn't get it right
Thank you
0 Kommentare
Antworten (1)
Walter Roberson
am 1 Okt. 2021
See varargin special name. It will be a cell array of character vectors
However I don't think you can use eval() in compiled apps.
2 Kommentare
Walter Roberson
am 1 Okt. 2021
function main(varargin)
assert(nargin == 3)
[A,B,C] = varargin{:};
processprogram(A,B,C);
end
and invoke it with
main apple.txt banana peach
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!