How to pass parameter to a MATLAB program from Python ??
I would like to write a python program who pass parameters to a MATLAB program and run it, but don’t know how to do ??
Python program :
import matlab.engine;
eng = matlab.engine.start_matlab()
x = 0;
y = 1;
z = 2;
print(x);
print(y);
print(z);
eng.Python_testing(nargout=0)
==> HOW TO PASS x,y,z, to Python_testing.m ??
MATLAB Program Python_testing.m
x,y,z
<== HOW TO RECEIVE the parameter x,y,z in MATLAB from PYTHON program
a = 0.5*(x + y + z)
return a
<== Can a be returned back to Python program ? If so, how to do it ??I would like to write a python program who pass parameters to a MATLAB program and run it, but don’t know how to do ??
Python program :
import matlab.engine;
eng = matlab.engine.start_matlab()
x = 0;
y = 1;
z = 2;
print(x);
print(y);
print(z);
eng.Python_testing(nargout=0)
==> HOW TO PASS x,y,z, to Python_testing.m ??
MATLAB Program Python_testing.m
x,y,z
<== HOW TO RECEIVE the parameter x,y,z in MATLAB from PYTHON program
a = 0.5*(x + y + z)
return a
<== Can a be returned back to Python program ? If so, how to do it ?? I would like to write a python program who pass parameters to a MATLAB program and run it, but don’t know how to do ??
Python program :
import matlab.engine;
eng = matlab.engine.start_matlab()
x = 0;
y = 1;
z = 2;
print(x);
print(y);
print(z);
eng.Python_testing(nargout=0)
==> HOW TO PASS x,y,z, to Python_testing.m ??
MATLAB Program Python_testing.m
x,y,z
<== HOW TO RECEIVE the parameter x,y,z in MATLAB from PYTHON program
a = 0.5*(x + y + z)
return a
<== Can a be returned back to Python program ? If so, how to do it ?? python MATLAB Answers — New Questions