Probably a basic mistake, but the cause is eluding me. I am trying to import a package, but I get an error saying it cannot be found or imported.
First I set the current directory to the parent directory of the package, and this does not work.
Second, the docs say that the parent folder of the package must be added to the matlab path. I tried this, and still no luck.
It is not due to using plot as the package name as I get the same error when trying to import analysis.
What I can do is to import using: import plot.* or import analyse.* and then go on to use the functions in the packages, but I want to use the namespaces (i.e. not use .*).
Edit I'm having this problem on both versions I have installed: 2015b and 2016a.

addpath(a) it will only be for the current session. Usesavepathto make it permanent and (b) it won't include subfolders, usegenpathfor that like thisaddpath(genpath(pwd))(from theaddpathdocs) - Dan+in the folder names and use theaddpath(genpath...syntax depending on your usecase - Danimportunless you only want to get part of you package into your path. From these docs I think your currentaddpath(pwd)should work and you should be able to useanalyse.testFunc. The docs state All references to packages, functions, and classes in the package must use the package name prefix, unless you import the package. - Dan