How to include a command in my main.m?
이전 댓글 표시
I am submiting my matlab files in a server using linux. But I need to run some command lines when the server calls my main.m, how can I include this commands inside the main.m? This commands are: build mex and load('example workspace');
댓글 수: 5
Walter Roberson
2019년 4월 28일
Any reason not to just put those lines inside your main.m ?
antlhem
2019년 4월 28일
Walter Roberson
2019년 4월 28일
I do not recall that build is a function in any matlab package. If you are using using Distributed Computing Toolbox then you might tell the parpool to attach the files.
I think I have seen build used by some Linux software package managers. I wonder if you need to run the command in a shell using ! or system()
antlhem
2019년 4월 28일
Walter Roberson
2019년 4월 28일
The build given in that link is just a bunch of MATLAB code, and can be called from your main function.
It does require that MATLAB Coder be installed on the system it is running on, and perhaps that is the difficulty.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!