Can't open matlab .m files

8 views (last 30 days)
Morris Reitz
Morris Reitz on 23 Nov 2017
Commented: Image Analyst on 23 Nov 2017
When i try to open a matlab .m file, it doesn't matter who built it, i get this kind of error and nothing happens:
The class matlab.ui.internal.dialog.DialogUtils has no Constant property or Static method named 'imreadDefaultIcon'.
Error in msgbox>setupStandardIcon (line 438)
[iconData, alphaData] = matlab.ui.internal.dialog.DialogUtils.imreadDefaultIcon(iconName);
Error in msgbox (line 353)
Img = setupStandardIcon(IconAxes, IconString);
Error in errordlg (line 47)
handle = msgbox(ErrorStringCell,DlgName,'error',Replace);
Error in uiopen (line 194)
errordlg(err);
My suggestion was that the problem is because i have two matlab versions installed. The R2015b and the newest version R2017b. So i tried to uninstall both, but when i clicked on R2015b to uninstall it, i could only uninstall R2017b.
After doing this i still found R2015b on my computer but couldn't uninstall it anyway. So i tried to reinstall the new version but nothing happened.
May someone does understand this error above. Thanks a lot, have a great day!

Answers (2)

Image Analyst
Image Analyst on 23 Nov 2017
You should have both showing up in Control Panel "Programs and Features" (Win7) or "Apps and Features" (Win10). Uninstall anything you see there. Then go to c:\program Files\MATLAB and if there are any folders there, delete them. Then reinstall R2017b and set up any folders on the search path (like to your m-files) with the "Set Path" button on the tool ribbon. Then try to run some of your m-files again.

Jan
Jan on 23 Nov 2017
Edited: Jan on 23 Nov 2017
It seems, like either the paths of the two Matlab versions interfere, or that something different failed during the installation. Actually it works fluently to have multiple Matlab versions on one computer. I did not have any troubles with it for years. Maybe you have copied a toolbox function or folder from one version to the other? Or use the same pathdef.m file for both Matlab versions? Check the pathdef.m file in your Matlab working folder or user folder.
Uninstall both version at first. Start with a re-installing/repair of R2015b. Afterwards it should be possible to uninstall it. Then uninstall R2017b also - to be sure. Then the two Matlab folders should be empty - check this manually.
Finally after re-installing both versions, they should run without a problem.
  1 Comment
Image Analyst
Image Analyst on 23 Nov 2017
Good point about pathdef.
You might type %appdata% into File Explorer to bring up that folder and clear out any folders you see under Mathworks (or cut and move them somewhere else) to make sure you have a clean install.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!