필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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

채택된 답변

Nisha Rajiv
Nisha Rajiv 2012년 9월 17일
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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by