為什么"Call Python from MATLAB"?
Already working in MATLAB,and:
- Want to reuse existing Python code
- Need functionality that is only availabel in Python
For me:項目主要語言是Python。自己寫代碼的水平太低,沒辦法把一段現有的matlab代碼轉寫成Python,但又不得不用這一小段matlab實現的算法。
學習資料
https://github.com/mathworks/matlab-with-python
matlab教程How to Call MATLAB from Python Video配套code。
本視頻通過一個情感分析示例展示如何在MATLAB中調用Python代碼,示例包括,,然后使用預訓練好的機器學習模型預測文本中的情感(積極、消極、中性)。
在示例中,首先使用MATLAB從麥克風獲取音頻源,調用一個用戶定義的Python模塊從音頻信號中檢測文本,然后將文本數據返回到MATLAB中繼續進行情感分析。
https://github.com/hgorr/matlab-with-python
matlab教程Use Matlab with Python Videocode
https://www.mathworks.com/help/pdf_doc/compiler_sdk/compiler_sdk_python.pdf
compiler_sdk文檔
思路
Goal:通過 [MultibandKamath譜減法]批量處理語音數據

Table of Contents:
- python讀取音頻文件
- 調用matlab_處理后保存音頻文件、語譜圖文件
- 返回python進行圖像處理
方法一:MATLAB Engine API for Python
Install MATLAB Engine API for Python
方法二:
我們怎樣與沒安裝MATLAB的同行共享我們的工作?
https://www.mathworks.com/help/compiler/compiler.runtime.download.html
