MATLAB: Unable to save figures from figure window in matlab R2016b

save figure from figure window

I am new to matlab and I am using R2016b. Everytime I plot a figure and use the figure window to save the figure or use anything in the figure window like zoom tool I get error messages Error using fullfile (line 43) String input not supported.
Error using fullfile (line 43) String input not supported.
Error in filemenufcn>localUpdateNewMenu (line 136) if exist(fullfile(matlabroot,'toolbox/simulink/simulink/open_system.m'), 'file')
Error in filemenufcn (line 37) localUpdateNewMenu(hfig)
Error while evaluating Menu Callback
Error using fullfile (line 43) String input not supported.
Error in filemenufcn>localSaveExport (line 341) filename=fullfile(newpath,newfile);
Error in filemenufcn (line 56) localSaveExport(hfig, false)
Error while evaluating Menu Callback

Best Answer

Hi,
One potential cause for this issue is if there are built-in MATLAB functions that are being overridden by the user code. To check for this, we can use the function "which x -all" where x is another function name. In this scenario, it is a good idea to check the following:
>>which fullfile -all
>>which string -all
>>which isstring -all
to see if any of these are being overridden.
Please take care that you do not use names of built-in MATLAB functions for your variables or user-defined functions.