Runs in matlab, but not octave which throws error:
"the 'knnsearch' function belongs to the statistics package from Octave Forge but has not yet been implemented."
Possible work-arounds providing knnsearch equivalent function(s) in octave (or matlab) are m code at
https://stackoverflow.com/questions/27475978/finding-k-nearest-neighbors-and-its-implementation
in answer to https://stackoverflow.com/questions/43928294/octave-forge-knnsearch?noredirect=1&lq=1
P.S. In case you need other io or statistics pkgs in octave...
=== One-time global install of io and statistics pkgs ===
On macos 10.14 with brew install octave, just use these 2 commands in octave (run as same user as brew):
pkg install -global -forge io and pkg install -global -forge statistics
Warnings (like below) are not fatal.
GNU Octave, version 5.2.0
Copyright (C) 2020 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "x86_64-apple-darwin18.7.0".
Additional information about Octave is available at https://www.octave.org.
Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html
Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
octave:1>. pkg install -global -forge io
warning: creating installation directory /usr/local/Cellar/octave/5.2.0_9/share/octave/packages
warning: called from
install at line 30 column 5
pkg at line 441 column 9
csvconcat.cc:79:37: warning: result of comparison of constant
18446744073709551615 with expression of type 'unsigned int' is always true
[-Wtautological-constant-out-of-range-compare]
while ((pos=str.find(prot, pos)) != str.npos) {
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
1 warning generated.
OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "org.octave.OctClassLoader"). To use archived non-system classes, this property must not be set
For information about changes from previous versions of the io package, run 'news io'.
octave:2> pkg install -global -forge statistics
2020-08-12 15:36:20.076 octave-gui[30296:986773] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection interrupted
warning: doc_cache_create: unusable help text found in file 'gmdistribution'
For information about changes from previous versions of the statistics package, run 'news statistics'.
octave:3>
Runs in matlab, but not octave which throws error:
Possible work-arounds providing knnsearch equivalent function(s) in octave (or matlab) are m code at
https://stackoverflow.com/questions/27475978/finding-k-nearest-neighbors-and-its-implementation
in answer to https://stackoverflow.com/questions/43928294/octave-forge-knnsearch?noredirect=1&lq=1
P.S. In case you need other io or statistics pkgs in octave...
=== One-time global install of io and statistics pkgs ===
On macos 10.14 with
brew install octave, just use these 2 commands in octave (run as same user as brew):pkg install -global -forge ioandpkg install -global -forge statisticsWarnings (like below) are not fatal.