Matlab R2013a wont open files in Editor.

2 次查看(过去 30 天)
Hi,
I've just installed Matlab R2013a (32bit student edition) on my computer but am having trouble opening files. If I double click on an .m file in the current folder list on the left of the main screen, all I see is a little cursor in the top left corner spinning around but nothing else happens (waited over an hour to check if it was just being slow to respond).
If I click the 'New Script' button, the Editor opens fine and I can create a new file and save it. However if I then try and open that file again, it just hangs as mentioned above.
If I use the Open button, then any files in the 'recent files' list open fine (i.e. any I have just saved). However if I try to select a file not in the recent files list by clicking 'open...', an explorer window opens and I can select the file I want to open. However when I select the file I want, the explorer windows closes and nothing else happens except that I can no longer click the 'open' button and after 5 minutes or so Matlab hangs completely and I have to force quit it.
I have tried completely reinstalling MATLAB, but that didn't help - still have the same issue. I've also tried updating Java, but that made no difference either.
I do have Matlab r2010a installed which works fine.
I am using Windows 7 x64.
  9 个评论
Thomas Carpenter
Thomas Carpenter 2013-10-7
Further testing. I have edited the finfo.m file to see where in that function Matlab reaches using fprintf statements.
It reaches here:
if any(strcmp(['.' ext], matlab.io.internal.xlsreadSupportedExtensions)) || ...
any(strcmp(ext, ...
{'avi', ... % retaining avi file checks for backwards compatibility
'au' , 'snd', 'wav', ... % retaining au,snd,wav file checks for backwards compatibility
'csv', 'dat', 'dlm', 'tab', ... % text files
'wk1', 'ods', ... % other worksheet files
'im'})) % image files (see getExtension below)
at which point the if statement returns false and it jumps to
else % for unknown file types :
At which point it crashes. Its strange that finfo sees MATLAB's default file type (.m) as a 'unknown file type'
Thomas Carpenter
Thomas Carpenter 2013-10-7
编辑:Thomas Carpenter 2013-10-7
Result!
I commented out this line (Line 113) from finfo.m:
[ext, description] = getVideoInfo(filename,ext);
And open now works fine. So does double clicking on files.
So the question no is, why do those lines cause MATLAB to hang?

请先登录,再进行评论。

回答(3 个)

Ziemowit Laski
Ziemowit Laski 2016-9-7
编辑:Ziemowit Laski 2016-9-7
This is still a a problem with MATLAB 2016a (64-bit version). Any word on a real (MathWorks) fix?
In 2016a, the offending command is on line 186 of finfo.m.

larryb bliven
larryb bliven 2013-12-14
hi Tom, thanks for posting. i had similar problems with R2013a and your suggested fixed worked. i had to comment out lines associated with audio and video files. your approach is on point.

Chinthaka
Chinthaka 2014-4-4
HI, i have installed R2013a and having the same problem.. were you able to find a solution for this? (matlab stops working when i double click a .m file to open).
is it solvable by commenting out the line (Line 113) from finfo.m: ??
[ext, description] = getVideoInfo(filename,ext)
if so, can you please explain how to get the finfo.m edited? when searched, i found 3 finfo.m files among Matlab installation.
Please help thank you
  3 个评论
Abdi
Abdi 2014-6-8
Hi Thomas,
But I just tried to edit the file using Notepad++. When I want to save the changes, it refuses and says: "Please check if this file is opened in another program". So the changes cannot be saved. Do you know another way to edit the file? Thank you very much.
ss
ss 2015-10-8
I am trying to open the editor from matlabR2012a.. But each time I see the error message: error using open (line 163) failed to open matlab editor. What may be the problem?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by