One of the reasons for this error is due to an unsupported driver version. The driver version that is supported in MATLAB R2015a is (1.19.768). Follow the steps below to install the supported version of the driver :
1. In the Add/Remove Programs list, locate and uninstall 'LEGO MINDSTORMS NXT Driver for x64'
2. Install the required version of the driver that is available at the following link:
3. Verify the version of the installed support package using the following command :
matlabshared.supportpkg.getInstalled