Calling python while program execution in matlab

3 次查看(过去 30 天)
Hi there,
I would like to run my matlab code (assume in a for loop), and during each iteration of that loop call a python code and again come back to matlab.
Is such a thing possible?
P.S. consider the following simple example
for k = 1 : 7
% send "k" to python and pause matlab code
% execute python code (for example the code sends back weekday from python to matlab) and continue the code
end
Please provide a simple example (wether from python side to connect with matlab or wise versa).

回答(1 个)

ES
ES 2021-1-22
Please try Python Engine for MATLAB.
What you intend is fully achievable. https://in.mathworks.com/help/matlab/matlab-engine-for-python.html
  1 个评论
Sajjad Asefi
Sajjad Asefi 2021-1-22
编辑:Sajjad Asefi 2021-1-22
Thanks for the answer, but do you have any idea how shall I pause, and after python code execution, continue it?! I mean can you please provide a simple example

请先登录,再进行评论。

类别

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