How execute ipython jupyter code inside MATLAB?

조회 수: 15 (최근 30일)
Guilherme de Melo
Guilherme de Melo 2023년 11월 15일
댓글: Hiro Yoshino 2023년 11월 16일
Hello everyone,
There is a python code that I need to run inside MATLAB. It would do calculations using input values coming from arrays given and calculated before along the MATLAB code. The python code use Jupyter libraries, and the [base] status of the conda need to be running on “terminal” inside MATLAB. Does someone have suggestions about how I can run the code? Here is an example of how I am running the code currently on terminal:
(base) user@MacBook Downloads % ipython3 code.py 1 34.4 45 1000
1, 34.4, 45, and 1000 will be four different variables calculated before on MATLAB.
I will be grateful for any suggestion.

답변 (1개)

Hiro Yoshino
Hiro Yoshino 2023년 11월 16일
You can use pyrunfile to run a python file in MATLAB.
Your arguments can be given to the command too.
  댓글 수: 2
Guilherme de Melo
Guilherme de Melo 2023년 11월 16일
Is there way to download the pyrunfile code? My matlab is 2020a and it does not have thar function.
Hiro Yoshino
Hiro Yoshino 2023년 11월 16일
I am afraid not. A lot of development have been made to this area over the last 2-3 years and even today. You should use the latest if you look for better integration.

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

카테고리

Help CenterFile Exchange에서 Integration with Online Platforms에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by