Preferences do not persist across different MATLAB sessions launched with the -batch option. In MATLAB R2019a and later, the Run MATLAB Command action uses the -batch option to start MATLAB noninteractively.For example, to run myscript.m in a folder myfolder located in the root of the repository, you can specify command like this:Ĭommand: addpath('myfolder'), myscript Notes If your script or function is not in the root of your repository, you can use the addpath, cd, or run functions to put it on the path. When you use this action, all of the required files must be on the MATLAB search path. To fail the build in certain conditions, use the assert or error functions. Otherwise, MATLAB terminates with a nonzero exit code, which causes the build to fail. MATLAB exits with exit code 0 if the specified script, function, or statement executes successfully without error. If you specify more than one script, function, or statement, use a comma or semicolon to separate them.Įxample: results = runtests, assertSuccess(results) If the value of command is the name of a MATLAB script or function, do not specify the file extension. (Required) Script, function, or statement to execute. ![]() ![]() github/workflows directory of your repository, specify the Run MATLAB Command action as The action requires an input. name: Check out repository uses: name: Set up MATLAB uses: name: Run commands uses: with:Ĭommand: results = runtests, assertSuccess(results) Run MATLAB Command Name: Run MATLAB Commands runs-on: ubuntu-latest steps: Name: Run MATLAB Commands on GitHub-Hosted Runner on: jobs:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |