executing of function don't works

When i execute function I = nearestneighbour(P, X) ;X = rand(2, 100); P = rand(2, 3);i have this mistake : Undefined function 'nearestneighbour' for input arguments of type 'double'.

回答(1 个)

You are trying to use a function that does not exist. Like this:
>> this_does_not_exist(5,7)
Undefined function 'this_does_not_exist' for input arguments of type 'double'.
When I searched the entire MATALB documentation for "nearestneighbour" it returned no results:
So an error message "Undefined function" means that that function is undefined. You need to do one of these:
  • write that function yourself.
  • download it from a third party source (perhaps you meant to use this FEX submssion?: nearestneighbour).
  • if you already have the file make sure that it is on the MATLAB path.

2 个评论

Thanks But what is the MATLAB path where i save my nearestneighbour.m file? I have nearestneighbour.m that i saved in Mes Documents repersory
Use the folder tree in the Current folder panel to browse to the "Mes Documents repersory" folder where you have the file saved. That will set the current folder to that folder and it will then be able to find it.

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息

提问:

2016-2-29

编辑:

2016-2-29

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by