Access MATLAB function in own function via python
Mostra commenti meno recenti
I want to access a MATLAB-function, that is used inside my own function via python. Therefore I use the python-package "matlab.engine". Including a MATLAB-function according to the documentation works fine. But supposing my MATLAB-function looks like this:
function y = test_function(input)
y = isprime(input)
end
and I want to access it via the following python script:
import matlab.engine
eng = matlab.engine.start_matlab()
a = eng.test_function(37.0, nargout=0, async=False)
print(a)
Then I get the following error:
Undefined function 'isprime' for input arguments of type 'double'
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Call MATLAB from Python in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!