API for Python Delay
5 次查看(过去 30 天)
显示 更早的评论
Running commands using the api for Python takes longer than they do in Matlab. For example, the following gcd command when run in Jupyter takes ~2ms to return while it returns in tens of microseconds in Matlab. Is this delay expected and unavoidable when using the api? I wanted to use the api for a real-time application, and extra miliseconds would hurt.
start = time.time()
myeng.gcd(3,3)
delay = time.time() - start
print(delay*1000,'ms')
>> 2.0017623901367188 ms
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!