Can't open editor in MATLAB 2020a

When I attempt to open a file in current directory, I get the following error message:
Error using edit (line 66)
Failed to open MATLAB Editor.
Caused by:
Unable to resolve the name matlab.desktop.
I have absolutely no idea what's going on. All answers to similar looking problems don't seem to apply.
BTW Using default matlab path. Also, there are no other versions of matlab on my computer.
Also, can't open files via Windows file manager although they are associated with MATLAB 2020a.

11 Comments

PS. should have mentioned that 2020a is newly installed
What shows up for
which matlab.desktop.editor.newDocument
You should expect
toolbox/matlab/codetools/+matlab/+desktop/+editor/newDocument.m
under the MATLAB installation directory.
Yep, that's what I get.
C:\Program Files\MATLAB\R2020a\toolbox\matlab\codetools\+matlab\+desktop\+editor\newDocument.m % static method or package function
MATLAB is certainly able to resolve the following call: matlab.desktop.editor.isEditorAvailable
and the answer is logical 1
...but it can't resolve matlab.desktop in the function call: matlab.desktop.editor.Document.openEditorForExistingFile('File.m')
>> matlab.desktop.editor.Document.openEditorForExistingFile('File.m')
Error using matlab.desktop.editor.JavaEditorDocument>openEditorViaFunction (line 493)
Open requires that File.m be an absolute path.
Computer happened to crash. On MATLAB re-start, I got the following:
Warning: An error occurred while reading the desktop configuration file.
Using the default configuration.
Editor now works properly. I really don't know what went on here. This has wasted hours. I've done nothing and the problem has resolved itself. Bizarre. I guess I'll keep fingers crossed and see if the problem is still resolved tomorrow.
Welcome back. It is Sunday. Editor opens properly if MATLAB opens with default path. If other paths are added and saved (or added at startup) then the editor does not open.
If the path is changed and saved then a new folder "C:\Users\domin\AppData\Local\Temp\Editor_vxdxq" is created and is added to the path. When MATLAB opens next time, it throws the following warning:
Warning: Name is nonexistent or not a directory:
C:\Users\domin\AppData\Local\Temp\Editor_vxdxq
In itself, this doesn't seem to cause any trouble but it might indicate something funny in the setup.
That last bit is normal, and has to do with the way Live Script works.
Is it possible that some function you are adding the path to is interfering with MATLAB? For example there is a common third-party software package that defines isrow() and that causes problems.
Not that I'm aware of. I'll take a look but it might take a while.
Found it! In a package I was given, several levels down, there is a subpackage called +matlab. Remove this and the editor problem doesn't exist. This has been in place for years and hasn't caused any clashes up to and including 2018b. Obviously, 2020a initializes differently. Apologies for the panic ... the root cause was totally unexpected.

Sign in to comment.

Answers (0)

Categories

Products

Release

R2020a

Asked:

on 5 Sep 2020

Commented:

on 7 Sep 2020

Community Treasure Hunt

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

Start Hunting!