Hi,
This error may arise because of multiple reasons, I am assuming that you have Image Acquisition Toolbox and the webcam was in a running state (if not try downloading supporting AddOns for your webcam).
The following error occurred because MATLAB is trying to access an object of the camera which no longer exists. Try reloading the webcam after deleting all the existing objects of the camera.
Refer to the following link for further details: