Unrecognized function or variable "Run Python script file from MATLAB"

24 次查看(过去 30 天)
i use this exmple
Create Python script addac.py
def add(a,c):
b = a+c
return b
z = add(x,y)
.when use this scripts in MATLAB its showing error Unrecognized function
pyrunfile("addac.py","z",x=3,y=2)
Unrecognized function or variable 'pyrunfile'.

采纳的回答

Julius Muschaweck
Julius Muschaweck 2021-12-1
In my Matlab 2021a, I get the same error message.
In the online documentation, it says "Introduced in R2021b". It seems you're using an earlier version than the brand new R2021b.
  2 个评论
Divyesh pandav
Divyesh pandav 2021-12-1
编辑:Divyesh pandav 2021-12-1
@Julius Muschaweck Good evening sir, how to use this function in MATLAB 2021a?
https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/python-compatibility.pdf

请先登录,再进行评论。

更多回答(0 个)

类别

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