Connecting Matlab and Python

46 views (last 30 days)
Hi guys,
I have a program in MATLAB that performs a few tasks.
In the process of solving the problem at hand I had to make a python script that does something and then the data needs to be returned back to MATLAB for machine learning.
I have all the code working fine but I need to run code in MATLAB, then save a CSV file, run a Python script and save in CSV again only to return to MATLAB for getting results.
So all in all I have 2 MATLAB scripts and 1 Python script that I need to combine.
I know that there's ways I could combine the two programs, what's the best way to do it?
If I am able to run this python script in MATLAB, how will I have access to the variables I have there? (for example: my python script returns a pandas dataframe which I save as a csv then run a MATLAB program on)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!