MATLAB Answers

How to call Python Script in Matlab

51 views (last 30 days)
I want to call python script into Matlab for further processing. I watched couple of threads mentioned at but always gets an error when do this in command prompt
>> py.ReadIFSLog
Unable to resolve the name py.ReadIFSLog
I have MATLAB 2020a. What am I doing wrong?

Accepted Answer

Kunal Kumar
Kunal Kumar on 19 Nov 2020
I understand that you are trying to call your own python script from MATLAB command window.
The syntax that you are using is for calling python built-in modules from MATLAB, not scripts. Please have a look at the answer posted for a similar question.
Akshay Dhyani
Akshay Dhyani on 24 Nov 2020
Update: Looks like I cannot call a function which call another function. I think its better to save the output file in python as .mat and then just use the output from it.

Sign in to comment.

More Answers (0)





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!