I have a .m code what I want to run in python. Is it any easy way? 1. this code is not a function. 2. don't want to show the matlab window.
Kshitij Singh answered .
2025-11-20
import matlab.engine eng = matlab.engine.start_matlab() eng.simple_script(nargout=0) eng.quit()
The Matlab script would be perhaps this one line saved as simple_script.m:
a = 'it works easily...'
a =
'it works easily...'