Run matlab commands from a bash script
8 次查看(过去 30 天)
显示 更早的评论
I'm wirting a shell script to automate a few tasks. From my shell script I start Matlab with the following line:
matlab -nosplash -nodesktop
After startting matlab I want to run a few commands for example:
path(path,'path to be added')
How do I feed these commands to my open instantiation of Matlab?
0 个评论
采纳的回答
Steven Lord
2019-10-22
If you're using an earlier release, use the -r startup option.
Follow -batch or -r with the name of the script or function you want to execute or the list of commands you want to execute.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!