How to make a script return an output argument in python?
Show older comments
Hi I have linked python to matlab. I am running a script written in MATLAB in python. I am using as reference
I want my script to return the variable in my python window. How i can do it? Can i avoid this without converting it to a function?
b = 5;
h = 3;
a = 0.5*(b.* h)
import matlab.engine
eng = matlab.engine.start_matlab()
eng.triarea(nargout=0)
1 Comment
yashvin
on 29 Jul 2015
Accepted Answer
More Answers (0)
Categories
Find more on Call MATLAB from Python in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!