MATLAB: Can’t I find the “openAndConvert” function

MATLAB

While working on live scripts in a MATLAB project, the Report->Dependencies indicates that the code depends on the function "openAndConvert". Where can I get this function?

Best Answer

There is an "openAndConvert" function packaged with LiveEditor and shipped with MATLAB. However, it is not clear from this description whether the "openAndConvert" function that your code depends on is the built-in MATLAB function or a custom function that you have written that shares the same name.
Assuming it is the built-in MATLAB function, 
1. To locate the directory in which the file resides, please enter the following command:
which matlab.internal.liveeditor.openAndConvert
in the MATLAB Command Window. The output of this command gives the location of the file.
2. To get more information on the working of "openAndConvert", please enter the following command
help matlab.internal.liveeditor.openAndConvert
in the MATLAB Command Window.
If it is indeed the MATLAB built-in function, importing the file will resolve the issue you are facing. To import the function, please include the following command in the custom code.
import matlab.internal.liveeditor.openAndConvert
If this is instead a function that you have written that shadows the built-in function, you will need to figure out where you saved that function file and import it.