运行 在 ubuntu 终端或 bash 脚本中使用系统参数的 Matlab 脚本

run Matlab script with system argument in ubuntu terminal or bash script

我想在 ubuntu 终端上 运行 matlab 脚本或 bash 带有系统参数的脚本。

例如,在python、

sample.py


variable_name=sys.argv[1]

print(variable_name)

并且,运行像这样。

$ python sample.py arguments

我怎样才能 运行 这样的 matlab 代码?

但是,你想做什么? Matlab 有一个 system 函数 system

如果您想要请求用户输入并保存,input