In Matlab, how to set M file opening mode to editor by default?

Source: Internet
Author: User

It may be because ghost is used to recover Windows XP, or another reason..mThe 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.mFile 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 ¶
  1. Open a folder, and choose tools> folder
    Options)
  2. Then, click File
    Types), in the "registered file type" (registered
    File types), find the "M" file type, and click "Restore" (Restore) below ).
  3. In this way, if not, jump to the third article below.
Ii. Windows 7 Environment ¶
  1. Open the MATLAB program;
  2. 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!')
  3. Open an include.mFile folder;
  4. Right-click a. M file and select open mode --> select default program (C );
  5. 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.mRe-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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.