The Caffe Framework has interfaces to be used in MATLAB, such as the "caffe" object above, but we do not create and cannot provide technical support for that framework.
I suggest you install the "MatCaffe" framework according to the instructions under the "Build MatCaffe" section on the Caffe interfaces page below and you should be able to use the code you shared.
