2010-04-13 35 views
0

我以下的步驟:如何在MATLAB中導入BNT工具時處理警告?

http://code.google.com/p/bnt/wiki/HowToInstall

但只得到了很多警告:

>> addpath(genpathKPM(pwd)) 
Warning: Function 
D:\MATLAB\R2007b\toolbox\FullBNT-1.0.4\KPMtools\assert.m has the same 
name as a MATLAB builtin. We suggest you rename the function to avoid a 
potential name conflict. 
> In path at 110 
    In addpath at 89 
Warning: Function 
D:\MATLAB\R2007b\toolbox\FullBNT-1.0.4\KPMtools\isscalar.m has the same 
name as a MATLAB builtin. We suggest you rename the function to avoid a 
potential name conflict. 

有其他人遇到這個問題?

+2

爲什麼不從http://code.google.com/p/bnt/downloads/list – Amro 2010-04-13 15:31:26

回答

2

該警告意味着它說的是:BNT包含一些與Matlab內置函數具有相同名稱的函數。

如果新功能與內置版本不兼容,這有可能會破壞某些功能,儘管這取決於path precedence,即Matlab在尋找您要調用的功能。

簡而言之,如果新功能與內置版本兼容,則應確保將工具箱的路徑添加到Matlab路徑的頂部,以確保它始終是工具箱版本被稱爲(鍵入path來檢查)。我希望情況是這樣,否則你應該重新組織工具箱目錄結構並將有問題的函數放在一個名爲'private'的目錄中(詳細信息請參閱路徑優先級)。

EDIT

鏈接的文檔聲稱,重載函數是兼容的。祝你好運!

+0

獲取更新後的版本1.0.5有沒有辦法在'addpath(genpathKPM( pwd))'? – Gtker 2010-04-13 15:24:29

+0

你檢查了嗎?至少在R2010a中,addpath默認添加到頂部。否則,在addpath中添加'-begin'選項,如下所示:'addpath(genpathKPM(pwd),' - begin')' – Jonas 2010-04-13 15:35:01