Effacer les filtres
Effacer les filtres

I have value in matlab that has to given to python script. How should i pass the variable to it

1 vue (au cours des 30 derniers jours)
a= 30;
b= 120;
c= 90;
system('python D:\ex.py');
how will i be able to access the variables a,b,c in ex.py

Réponse acceptée

Nisha Rajiv
Nisha Rajiv le 17 Sep 2012
I have found it...This is what i wanted!
a= 30;
b= 120;
c= 90;
syscmd = sprintf('python D:\\ex.py %d %d %d', a, b, c);
system(syscmd)

Plus de réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by