Calling a MATLAB Application file from a terminal
이전 댓글 표시
Hi all,
I would like to call a MATLAB application file, called "mocoPlot.mlapp" from the terminal. The line I am using is
matlab -r mocoPlot.mlapp
Normally this would work for .m files, however it seems to not be correct for .mlapp files. Once the MATLAB instance opens, the following error appears in the console:
Unable to resolve the name mocoPlot.mlapp.
Exception "java.lang.ClassNotFoundException: com/intellij/codeInsight/editorActions/FoldingData"while constructing DataFlavor for: application/x-java-jvm-local-objectref; class=com.intellij.codeInsight.editorActions.FoldingData
>>
I could not find any documentation as to why this would not work, so I am a bit stumped on what to do in order to call the .mlapp file from the terminal. If it is relevant, my MATLAB bin is added to the environment PATH and the .mlapp file sucessfully opens when done manually.
Any help/advice is appreciated.
댓글 수: 1
Rik
2020년 11월 21일
Maybe you need to provide the full path?
답변 (1개)
Mario Malic
2020년 11월 21일
편집: Mario Malic
2020년 11월 21일
0 개 추천
You should provide only Application name, without extension. Also, it needs to be on MATLAB path.
댓글 수: 2
Rik
2020년 11월 21일
I don't know if that also holds true for apps, but for normal scripts you can also use the full path to a file you want to run. Then it doesn't need to be on the path.
Mario Malic
2020년 11월 22일
One of the suggestions from the batch is not to use file extension, it might hold true for the -r option.
However, if you want to use full path then it's appropriate to pair that with run command
matlab -r "run C:\folder\app.mlapp"
카테고리
도움말 센터 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!