MATLAB: Can you please explain the meaning for below error meessage code

can you please explain the meaning for below error meessage code

A=imread('ICON_PHR1B_MS_201711091016570_ORT_3432577101-2.JPG');
>> figure,imshow(A);
Error: File: imageDisplayValidateParams.m Line: 170 Column: 1
The function "findImageType" was closed with an 'end', but at least one other function
definition was not. To avoid confusion when using nested functions, it is illegal to use
both conventions in the same file.
Error in imageDisplayParseInputs (line 79)
common_args = imageDisplayValidateParams(common_args);
Error in imshow (line 220)
[common_args,specific_args] = …

Best Answer

There is a missing end in the function imageDisplayValidateParams. As far as I can see, this is a Matlab toolbox function called from imshow. This function should be valid, so if an end is missing, you must have edited it. This can happen by accident, if you start Matlab as admin and open toolbox files. Therefore it is strongly recommended not to work as admin.
Restore the file imageDisplayValidateParams.m from your backup. See e.g. Recent Versions in Windows.