Running MatLab in Python error
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Running the following code in Python (Spyder):
import matlab.engine
eng = matlab.engine.start_matlab()
eng.addpath(r'/Users/username/Desktop/spiray_array_model/matlab',nargout=0)
gives me this error:
Warning: Name is nonexistent or not a directory
I can confirm that '/Users/username/Desktop/spiray_array_model/matlab' is indeed a directory.
Is this because I am running from an IDE (Spyder) ? Or am I missing something else?
0 Kommentare
Antworten (1)
Jesus Sanchez
am 28 Nov. 2019
Have you tried to delete that "r" that is just before your path?
3 Kommentare
Jesus Sanchez
am 30 Nov. 2019
Then the only reason that I can think of is that something is missing. Try to write the full path, including 'C: ...' or whichever directory your folder is into.
Siehe auch
Kategorien
Mehr zu Call MATLAB from Python finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!