MATLAB: Please help me to troubleshoot this problem while executing the program of reading an image from work space!!!!!!

need help

>> clear >> image Attempt to call constructor cell with incorrect letter case.
Error in cellstr (line 23) c = cell(numrows,1);
Error in rmfield (line 22) field = cellstr(field);
Error in images.internal.imageDisplayValidateParams (line 32) common_args = rmfield(common_args,'Colormap');
Error in images.internal.imageDisplayParseInputs (line 78) common_args = images.internal.imageDisplayValidateParams(common_args);
Error in imshow (line 223) [common_args,specific_args] = …
Error in image (line 2) imshow(original);
>>

Best Answer

As indicated in https://www.mathworks.com/matlabcentral/answers/385363-can-anyone-familiar-with-this-type-of-problem-in-r2015a-need-help#answer_307576, somewhere on your path, you have a function name that is the same as one of the built-in MATLAB functions, and that is interfering with the operation of this function.
Most likely you have a cell.m that does not belong. Check by using
which -all cell
None of the results shown should point to any file of your own. All of the results should either mention "built-in" or "method". For example,
/Applications/MATLAB_R2017a.app/toolbox/distcomp/parallel/@distributed/cell.m % distributed method
is fine: notice the "method" at the end.
But if you had
/Users/people/sara/MATLAB/eec305/assignment7/cell.m
show up, then that would be interfering with the built-in function.