My classmate and I are working on a program and I need to call the m. file he wrote to solve a equation.
However, I found out It is ten times slower to call Matlab functions in python than runing the same function directly in Matlab. Can I solve this problem?
The function in python is described as below:
engine = matlab.engine.start_matlab()
print('start_engine')
t_begin = time.time()
rod, s1, s2, s3 = engine.shape_sensing(1.96, 2.77, 1.45, nargout=4)
t_end = time.time()
t = t_end-t_begin
print(t)