MATLAB: I can’t read .txt using importdata

data importfunctionMATLABscr

Hello,
When I'm trying to read my .txt file using syntax importdata, i got this notification on my command window.
Same thing happen when I tried to read my .jpg file. Any clues in this problem? It will be really helpful
Thanks

Best Answer

You have created your own script and named it ‘importdata.m’. Name your script file something else, such as ‘myImportData.m’ or something that does not ‘overshadow’ any MATLAB function. That should resolve the error.