How to open a python GUI with matlab code?

13 ビュー (過去 30 日間)
Bradley
Bradley 2024 年 12 月 19 日
回答済み: Swastik Sarkar 2024 年 12 月 19 日
I have a python script which is pretty long. There is a command I can enter in the Anaconda powershell that will open a GUI for this script, the script is a sonar processor called PING Mapper. I have a matlab script ive written for my own GUI to process lots of data coming off a boat, it gives the user the ability to convert the original .BIN files to CSV and show lots of graphs and stuff. What I want it to have a button in my matlab script that opens this python GUI. I havent been able to find a way using pyrunfile or pyrun and im wondering if anyone can point me in the right direction. Thanks!

回答 (1 件)

Swastik Sarkar
Swastik Sarkar 2024 年 12 月 19 日
Based on the description provided, I assume the Python script is being executed in the Anaconda Powershell using a command like:
python3 script
Consider using the system command in MATLAB to gain more fine-grained control over the environment and the process being launched. The command would look like this:
[status, cmdout] = system("python3 path/to/script");
To learn more about system, refer to the following documentation:
Hope this helps launch the python GUI !

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

タグ

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by