Is there any way to call python in r2014a ?

I have read different resources which explain that python is supported by r2014b and newer versions. I have only the license of r2014a.
Is there any way to call python script from r2014a ?

 Réponse acceptée

saad essahli
saad essahli le 24 Juil 2019
Modifié(e) : saad essahli le 24 Juil 2019
I found a way out. I used matlab function dos() to execute python scripts as well as functions and get results back to matlab using one line. Try to have look at example below.
i.e. matlab -> OS command line -> python script/function.
dos() function returns the python results to matlab.
Example:
test.m
def test_func(a, b):
print('a/b =',a,'/',b);
Then back to matlab:
>> [status,cmdout] = dos('python -c "from test import test_func; test_func(20,20)" ')
It's still not efficient for time consuming applications. still look for an efficient strategy..

Plus de réponses (0)

Catégories

Produits

Version

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by