目录

MATLAB调用python脚本

MATLAB调用python脚本

MATLAB如何调用python脚本?

我们可以通过Matlab的 system指令 ,实现对python脚本的调用。

https://i-blog.csdnimg.cn/blog_migrate/1adb4f47b721bf7b98d345930b7e4295.png

因此,实现方法为:

[status,cmdout]=system(‘python D:\Desktop\hello_world.py’)

即python 路径

运行结果:

https://i-blog.csdnimg.cn/blog_migrate/f656d5f8659b3bc59b78db3a4f9ee344.png