I installed MATLAB R2015a, downloaded Caffe, successfully built and tested it(did 'make runtest' and 'make mattest' without any failure), and also downloaded 'piotr's matlab toolbox'.
The problem is that when I run the code, I get an error like the image below.
![](https://lh3.googleusercontent.com/-T4NzrdKF9jM/VxyQghia4EI/AAAAAAAAAEU/DrGMe4_twaIsefoU3Dgy6ziq8JPIplYawCLcB/s1600/matlab_warning.PNG)
cnnPyramid just calls addpath function in line 13, as below.
![](https://lh3.googleusercontent.com/-kocNFSLzsLM/VxyRT1cyeLI/AAAAAAAAAEc/jFUlhd9y0AMvwpQ2ZHK7M5jmEQUFfifIgCLcB/s1600/cnnPyramid_line13.PNG)
The directory ~/caffe/matlab/ looks like this. I created an symbolic link by typing "ln -sf ~/caffe/matlab/+caffe ~/caffe/matlab/caffe".
![](https://lh3.googleusercontent.com/-BP0LlbK0Hp8/VxyRrodg9vI/AAAAAAAAAEg/OaHxejQq-LYBS2VOJc-_ZGjzkFoQtZBqgCLcB/s1600/directory_caffe.PNG)
I tried changing line 13 to
addpath(['~/caffe' '/matlab/']);
In this case, the warning disappears, but 'Undefined function or variable 'caffe' error still exists.
I also tried following, but here another warning occurs.
addpath(['~/caffe' '/matlab/+caffe']);
![](https://lh3.googleusercontent.com/-ZihF8fhan0g/VxySkiGFplI/AAAAAAAAAEo/ngG4zHm1Tfsp5s0qf6PH6JoH-37PPoq7ACLcB/s1600/matlab_warning_not_allowed.PNG)
I guess that the error "Undefined function or variable 'caffe'" occurs because of this warning, but I couldn't figure out the way to solve this problem.
How can I solve this problem? Any help would be appreciated.
Thanks.