My solution works fine on my Laptop unter R2015b. Nevertheless i get the error:
While evaluating the solution, the server encountered an error caused by temporary unavailability of MATLAB Service. Wait a few minutes for the MATLAB Service to return, and then rescore.