在python上获得一个matlab代码的结果 [英] Getting a matlab code's results on python
本文介绍了在python上获得一个matlab代码的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有matlab中的代码,其结果我想在Python代码中使用(作为矩阵或作为.dat文件)。任何人都可以告诉我这是怎么做到的?
I have code in matlab whose results I would like to use in python code (as a matrix or as a .dat file). Could anyone tell me how this could be done?
推荐答案
NumPy和SciPy可以读写MATLAB .mat 文件直接使用 scipy.io.loadmat
和 scipy.io.savemat
。
NumPy and SciPy can read and write MATLAB .mat files directly using scipy.io.loadmat
and scipy.io.savemat
.
这篇关于在python上获得一个matlab代码的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文