Passing named arguments to a standalone executable
显示 更早的评论
Hi,
I am using Function Argument Validation - MATLAB & Simulink (mathworks.com) for a function input with named input (see example below). Now, I want to compile that function to a standalone executable and call it from the command line. Passing positional arguments works fine but how can I pass a named argument (like "namedArg1")?
function test(arg1, arg2, opts)
arguments
arg1 string
arg2 string = "arg2Val"
opts.namedArg1 string = "msg"
end
disp(opts.namedArg1)
end
I tried calling the executable like:
test.exe "abc" namedArg1="tstMsg"
but that doesn't work.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Compiler 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!