I have a script that, at the end, writes the generated figure to an image file:
fileName = 'figureOne';print('-dpng', fileName );
This has been working without problems, but now the print command generates the error
Error using fopenThe file name contains characters that are not contained in the filesystem encoding. Certain operations may not work as expected.Error in name (line 84) fidread = fopen(pj.FileName,'r');Error in print (line 85) pj = name( pj );Error in print
Clearly there are no unacceptable characters in the file name. This other thread suggested a couple of fixes, but none of them seem to be the case. In particular, the commands
get(0, 'Language')locale = java.util.Locale.getDefault()language = locale.getLanguage()
return
ans =en_GBlocale =en_GBlanguage =en
..but I doubt the problem is with the last one being just 'en' and not 'en_GB'. Rather, what has very likely caused this (though I don't know exactly how) was me having recently copied over (with overwrite) some .m files into Matlab's directory (under toolboxes etc), from another installation (2016a). A symptom of it is the warnings that I get when starting Matlab, for several functions, such as:
Warning: Function license has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
But fopen is not among them, and I am not sure what to change to solve my current problem. Would very much appreciate any help with this!
Best Answer