我正嘗試使用Mathworks的instructions構建並運行Matlab引擎示例「engdemo.c」。當我嘗試用命令!./engdemo
運行它,我得到了以下錯誤:在Mac OSX上的engdemo.c - 無法啓動MATLAB引擎
matlab: Command not found.
Can't start MATLAB engine
我沒有在其他相關的StackOverflow職位找到了解決這個(如matlab engine 「Can't start MATLAB engine"或How solve the 「Can't start MATLAB engine」 command? [closed])
我將csh安裝在/ bin/csh(通過鍵入which csh
進行檢查)。
我在我的PATH變量上有Matlab,並且我已經根據Mathworks instructions爲Mac OSX設置了DYLD_LIBRARY_PATH變量。以下是我已經包含在我的.bash_profile中設置這些環境變量行:
# Settings for Matlab Engine using Apple XCode
export PATH=$PATH:/Applications/MATLAB_R2014a.app/bin
export PATH=$PATH:/Applications/MATLAB_R2014a.app/bin/maci64
export DYLD_LIBRARY_PATH=/Applications/MATLAB_R2014a.app/bin/maci64:/Applications/MATLAB_R2014a.app/sys/os/maci64:$DYLD_LIBRARY_PATH
最後,我想建立一個使用MATLAB腳本(與XCode的理想建立)一個C程序,但它是令人沮喪的有麻煩甚至讓演示工作。