It may be because ghost is used to recover Windows XP, or another reason..m
The machine opens the file.
MATLAB program, rather than opening it in the MATLAB editor as before, is inconvenient. Even more depressing, if the MATLAB program has already been opened, double-click.m
File to open another
The MATLAB interface is quite annoying.
I encountered this problem again in Windows 7 today and did not want to cancel the "Restore" file type association operation in Windows 7. It took some effort to solve the problem. Update this article by the way.
I. Windows XP Firewall ¶
- Open a folder, and choose tools> folder
Options)
- Then, click File
Types), in the "registered file type" (registered
File types), find the "M" file type, and click "Restore" (Restore) below ).
- In this way, if not, jump to the third article below.
Ii. Windows 7 Environment ¶
- Open the MATLAB program;
- In the command line window, run the following command (copy and paste it in ):
commandwindow; cwd=pwd; cd([matlabroot '\toolbox\matlab\winfun\private']); fileassoc('add','.m') ;cd(cwd); disp('Changed Windows file association. M-files are now associated with MATLAB. Congratulations!')
- Open an include
.m
File folder;
- Right-click a. M file and select open mode --> select default program (C );
- In the pop-up dialog box below, follow the selection and note that the following area is checked:
Select the associated program of M-file as MATLAB
If you select the next MATLAB starter, It will be opened by double-clicking.m
Re-open a MATLAB File
Program; if not checked, you need to set it again next time.
The above mentioned MATLAB command line is mentioned here, and I am here for reference.
Iii. Considerations ¶
However, if the file already exists in the MATLAB program
-- Preferences -- if the editor or debugger is set to open with another editor, you need to reset it to "Matlab Editor.
MATLAB editor settings
By the way, this MATLAB software running mode is really good: When I migrate from XP to Windows 7, I can directly copy the folder and run it without re-installation; then I switched to a computer (t420s), Windows
7 is changed to the 64-bit version, and the folder can be copied directly. However, the problem is that you will encounter the above mentioned troubles. Fortunately, it is no longer a problem now. It is estimated that this can be done for Windows 8 in the future (the second method above ).
The original Article is published in my Blogspot and cannot be accessed. Transfer in. Well, today I added
The solution in Windows 7 has finally been improved.