필터 지우기
필터 지우기

Open a python file in Matlab appdesigner.

조회 수: 18 (최근 30일)
Marwah Rehman
Marwah Rehman 2022년 2월 8일
답변: Sai Gokul 2023년 7월 12일
I created a GUI on python using tkinter and i also have a GUI on matlab that i created using appdesigner. I would essentially like to press a button on the appdesigner that will open the python file that i can run. This way both my GUIs are connected. Is there a way to do this? Any help would be appreciated. Thank you.
  댓글 수: 2
Anupreet Singh
Anupreet Singh 2022년 2월 10일
I am also wondering about this - does this functionality exist in MATLAB?
Javeria Ahmed
Javeria Ahmed 2022년 2월 10일
I also have this issue, how can I use matlab as an interface for my python code?

댓글을 달려면 로그인하십시오.

답변 (1개)

Sai Gokul
Sai Gokul 2023년 7월 12일
Hello Rehman,
I understand that you want to you want to open tkinter GUI from MATLAB App Desiger
Here's an approach you can follow:
In the callback function associated with the button in MATLAB, you can use the 'pyrunfile' command to execute a Python script. For example, you can use the following code snippet:
function openPythonGUIButtonPushed(app, event)
pyrunfile("python path/to/your/python_script.py");
end
You can also refer to the documentation below :

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by