close

將m file轉成exe,使其能在沒有matlab開發環境也能執行m file

此動作在windows作業系統底下,使用Matlab R2010b與Microsoft Visual C++ 2008製作而成

 

首先要安裝呼叫此m file的C compiler

由下圖可得知,我有VC2012、VC2008、VC6.0

本專案要在VC2008所執行,因此一開始就先安裝VC2008

於Matlab Command Window下指令:mbuild -setup

選擇C compiler,確認路徑是否正確。

matlab2exe1

於Matlab Command Window下指令:deploytool

開啟Deployment Project 開啟編譯專案,命名專案名稱,選擇路徑

matlab2exe2

於Deployment Tool設定專案,包括主要的m file、附加檔案等

確定沒問題後,點選右上角第一個圖示建立exe執行檔。

matlab2exe3  

arrow
arrow
    全站熱搜

    glitterHsin 發表在 痞客邦 留言(0) 人氣()