MATLAB: Watershed

dicomdigital image processingimageimage processingwatershed

I am having an error in watershed code.. i-e
L = watershed(gradmag);
error:- ??? Attempt to execute SCRIPT watershed as a function: C:\Users\Asad\Documents\MATLAB\watershed.m
Error in ==> watershed at 12 L = watershed(gradmag);

Best Answer

Hi, Just simple mistake.
You save your script with name watershed
however, watershed is built-in function in Matlab.
Try to rename your script and it will works.
Related Question