Application compiler: Command line Input type options missing
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Deepa Maheshvare
il 3 Ago 2021
Commentato: Kojiro Saito
il 4 Ago 2021
I am using Application compiler for generating a standalone application. I'm following the documenttaion available here
I don't find the `Command line Input type options` shown here ( https://in.mathworks.com/help/compiler/create-and-install-a-standalone-application-from-matlab-code.html ) above Additional installer options.
I'm using 2021a.
Could someone help me with this? I'd like to include `Command line Input type options` to pass input arguments to the executable file.
0 Commenti
Risposta accettata
Kojiro Saito
il 3 Ago 2021
Modificato: Kojiro Saito
il 3 Ago 2021
"Command line input type options" will be shown if m file is a function.
In the documentation example which you mentioned, the magicsquare.m file is a function.
function m = magicsquare(n)
if ischar(n)
n=str2double(n);
end
m = magic(n);
disp(m)
It seems that your main.m is a script file.
4 Commenti
Kojiro Saito
il 4 Ago 2021
This document(Developing Classes — Typical Workflow) will be helpful.
There various ways to implement your class.
Simple way is the following.
classdef classname
properties (SetAccess = private)
Number
end
methods
function val=classname(arg)
val.Number=arg;
end
end
end
function out = main(arg)
myClass = classname(arg);
out = myClass.Number;
end
By the way, it's getting going away from the original question, so if you have further question, it's better to post it as another question.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Application Deployment in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!