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.

Antworten (1)

Mario Malic
Mario Malic am 21 Nov. 2020
Bearbeitet: Mario Malic am 21 Nov. 2020

0 Stimmen

You should provide only Application name, without extension. Also, it needs to be on MATLAB path.

2 Kommentare

Rik
Rik am 21 Nov. 2020
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.
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"

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu External Language Interfaces finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020a

Gefragt:

N/A
am 21 Nov. 2020

Kommentiert:

am 22 Nov. 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by