Python code in Matlab standalone app
37 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Using the "Python Code task in the Live Editor" I created an *mlx file that runs my Python correctly in Matlab. Using this file in the App designer of Matlab also works fine untill I compile a standalone app. Then it doesn't work anymore: The app can be launched but it doesn't work. Not on my computer and also not on other computers without Matlab/Python (without any error).
Anything that I can do to get it working?
0 Kommentare
Antworten (1)
Kevin Holly
am 4 Sep. 2025 um 20:32
You can save your python code in a script and call the .py file from MATLAB using pyrunfile. When you go to compile the app make sure the .py file is included in the package.
2 Kommentare
Kevin Holly
am 5 Sep. 2025 um 15:57
Imdat,
Perhaps, the app isn't finding the script. I have attached an example app and Python script (saved as txt file) that I was able to compile. My first attempt, the Python script was not found after packaging. I am willing to jump on a call if that would help. Free feel to reach out to me at kevinh@mathworks.com.
Siehe auch
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!