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

조회 수: 25 (최근 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
Julius Muschaweck
Julius Muschaweck 2021년 12월 2일
This function (pyrunfile) is not present in Matlab 2021a.
This help page:
shows how to call user-defined python modules from Matlab R2021a

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

추가 답변 (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