Why Matlab returns undefined function when running MANATEE?

Matlab path error
Matlab path error

If when running MANATEE, you encounter the message "Undefined function ’run_MANATEE’ for input arguments of type ’char’" or "Undefined function or variable ’run_MANATEE’" that means there is a problem with your matlab path. Matlab path is a list of folder where matlab search for functions. If the folder containing run_MANATEE is not in the path, Matlab won’t be able to use it.

To set the path you can either right click on the MANATEE folder and select "Add to path/Selected Folders and Subfolders" to get all the MANATEE folder inside the path

Add to path from explorer
Add to path from explorer

The second way is by using the matlab path tool :

Matlab set path button
Matlab set path button

You will be able to see what is currently in your path, add and remove folders, reorganise the order ...

You can use the command which to know if Matlab is now able to detect the run_MANATEE function.

Which function search in the path
Which function search in the path

If your path is correctly set you will see the path to the run_MANATEE.p file.

Note that if you have several version of MANATEE, you have to make sure that only one version at the time is on the path to avoid conflict. Matlab will use the first run_MANATEE function it finds (by following the order in the path) and ignore all the others. In this case the command which can also help you to understand which version of MANATEE matlab is using (1.05.03 Demo in the example)

Previous Next