Run matlab commands from a bash script
조회 수: 19 (최근 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!