Unable to save figures from figure window in matlab R2016b

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

 Accepted 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.

4 Comments

Dear Vandana Thank you I have some thing like this which -all fullfile C:\Program Files\MATLAB\R2016b\toolbox\matlab\iofun\fullfile.p C:\Program Files\MATLAB\R2016b\toolbox\matlab\iofun\fullfile.m % Shadowed
>> which -all string string is a built-in method % string constructor C:\Program Files\MATLAB\R2016b\toolbox\matlab\datatypes\@categorical\string.m % categorical method C:\Program Files\MATLAB\R2016b\toolbox\matlab\bigdata\@tall\string.m % tall method C:\Program Files\MATLAB\R2016b\toolbox\matlab\codetools\@mtree\string.m % mtree method C:\Program Files\MATLAB\R2016b\toolbox\distcomp\parallel\@codistributed\string.m % codistributed method C:\Program Files\MATLAB\R2016b\toolbox\matlab\strfun\@string\string.m % Shadowed string constructor
>> which -all isstring C:\Users\LAKSHMI\Documents\Lakshmi\matlab_scripts\MatlabScripts\Herbert\utilities\general\isstring.m C:\Program Files\MATLAB\R2016b\toolbox\matlab\codetools\@mtree\isstring.m % mtree method C:\Program Files\MATLAB\R2016b\toolbox\distcomp\parallel\@codistributed\isstring.m % codistributed method built-in (C:\Program Files\MATLAB\R2016b\toolbox\matlab\strfun\isstring) % Shadowed
Can you help me?
Hi,
C:\Users\LAKSHMI\Documents\Lakshmi\matlab_scripts\MatlabScripts\Herbert\utilities\general\isstring.m
This seems to be a user defined function. Please change the name of this function.
Take care that you do not use names of built-in MATLAB functions for your variables or user-defined functions.
hi that worked perfectly thankyou:)
I seem to have a similar problem with isstring, however, my only conflict is as follows:
>> isstring('test')
ans = 0
>> which isstring -all built-in (/Applications/MATLAB_R2015b.app/toolbox/matlab/strfun/isstring) /Applications/MATLAB_R2015b.app/toolbox/matlab/codetools/@mtree/isstring.m % more method
both of which are built-in functions... any suggestions?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!