Application compiler: How do I pass a file as Command line Input type argument
Mostrar comentarios más antiguos
I am using Application compiler for generating a standalone application. I'm following the documenttaion available here
Example,
function m = magicsquare(n)
if ischar(n)
n=str2double(n);
end
m = magic(n);
disp(m)
On the command line, I do !magicsquare 5, to run the executable.
But when I want to pass a file (e.g excel or json file) as an input argument while running the executable generated for my use case, how do I pass an input file?
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 16 de Ag. de 2021
You need to wrap your filename in single or double quotes, expecially if there is a space, otherwise it will think you're passing two arguments. You should be able to do
!magicsquare("c:/users/Deepa/my data.xlsx"); % Run the .exe file (not the m-file)
Categorías
Más información sobre Java Package Integration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
