Thread Subject: associating .m files with matlab

Subject: associating .m files with matlab

From: nishant

Date: 9 Oct, 2010 12:15:07

Message: 1 of 25

i have uninstalled matlab 2009a n switched to matlab 2010b but now the .m files do not open..they give the option as windows do not know the file....i've also made changes to it's path n made it open with matlab C:\Program Files\MATLAB\R2010b\bin\win64 but it again launches an instance of matlab but not the file in the editor....
I simply end up getting two or three instances of matlab but not the editor...
 i have also tried 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.');
but it throws error saying cannot modify the registry....
i am using win7 64bit...this problem is really irksome....please help

Subject: associating .m files with matlab

From: Image Analyst

Date: 9 Oct, 2010 14:10:04

Message: 2 of 25

nishant:
I don't know how to do it in Windows 7, but in XP, there was a utility of Windows Explorer (the file management utility) under the pulldown menu Tools/folder options/File Types. There you could specify what app opens what file extension.

Subject: associating .m files with matlab

From: Mark Shore

Date: 9 Oct, 2010 15:24:04

Message: 3 of 25

This works more or less the same way in Windows 7 64-bit as it did in other versions. In Windows Explorer (i.e. the file browser) double-click on an m file. If the .m extension is not associated with another program (the way MS Access hijacks the .mat extension, for example) then a dialog box will open asking you to either use a web service to find the right program or for you to select it manually. Choose the latter, make sure the always use this program box is checked, and select the version of MATLAB you want to use.

Subject: associating .m files with matlab

From: CHEW YEONG

Date: 9 Oct, 2010 17:10:05

Message: 4 of 25

"nishant " <mishra.nishant@live.com> wrote in message <i8pmcb$doc$1@fred.mathworks.com>...
> i have uninstalled matlab 2009a n switched to matlab 2010b but now the .m files do not open..they give the option as windows do not know the file....i've also made changes to it's path n made it open with matlab C:\Program Files\MATLAB\R2010b\bin\win64 but it again launches an instance of matlab but not the file in the editor....
> I simply end up getting two or three instances of matlab but not the editor...
> i have also tried 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.');
> but it throws error saying cannot modify the registry....
> i am using win7 64bit...this problem is really irksome....please help

I'm having the same problem too. Instead of popping the .m editor, it keeps opening a new Matlab without the .m editor. I say it's a bug in R2010b.

Subject: associating .m files with matlab

From: Mark Shore

Date: 9 Oct, 2010 17:53:04

Message: 5 of 25

>
> I'm having the same problem too. Instead of popping the .m editor, it keeps opening a new Matlab without the .m editor. I say it's a bug in R2010b.

Mine works fine. R2010b in Win7 x64.

Subject: associating .m files with matlab

From: Steven_Lord

Date: 10 Oct, 2010 05:33:11

Message: 6 of 25



"CHEW YEONG " <chewyeong90@gmail.com> wrote in message
news:i8q7ld$euh$1@fred.mathworks.com...
> "nishant " <mishra.nishant@live.com> wrote in message
> <i8pmcb$doc$1@fred.mathworks.com>...
>> i have uninstalled matlab 2009a n switched to matlab 2010b but now the
>> .m files do not open..they give the option as windows do not know the
>> file....i've also made changes to it's path n made it open with matlab
>> C:\Program Files\MATLAB\R2010b\bin\win64 but it again launches an
>> instance of matlab but not the file in the editor....
>> I simply end up getting two or three instances of matlab but not the
>> editor...
>> i have also tried 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.');
>> but it throws error saying cannot modify the registry....
>> i am using win7 64bit...this problem is really irksome....please help
>
> I'm having the same problem too. Instead of popping the .m editor, it
> keeps opening a new Matlab without the .m editor. I say it's a bug in
> R2010b.

Try following the instructions on this page; if it still doesn't work,
contact Technical Support and work with them to determine the cause of this
behavior on your system.

http://www.mathworks.com/help/techdoc/matlab_env/f8-8880.html#f8-28791

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: associating .m files with matlab

From: Ethan Leong

Date: 11 Oct, 2010 02:18:03

Message: 7 of 25

I found the solution for this.

Download ccleaner and run the registry cleaner. Since R2010a is uninstalled, the registry is still pointing towards R2010a. After running the registry cleaner, the problem is fixed.

Thanks

Subject: associating .m files with matlab

From: Jonathan Wang

Date: 5 Jan, 2011 04:39:06

Message: 8 of 25

"Ethan Leong" <chewyeong90@gmail.com> wrote in message <i8ts4r$iu4$1@fred.mathworks.com>...
> I found the solution for this.
>
> Download ccleaner and run the registry cleaner. Since R2010a is uninstalled, the registry is still pointing towards R2010a. After running the registry cleaner, the problem is fixed.
>
> Thanks

Thanks for the tip, but again, if we are already running matlab, how can we simply open the m file ONLY, rather than launch another instance Matlab and its editor?

Jonathan

Subject: associating .m files with matlab

From: Jonathan Wang

Date: 5 Jan, 2011 05:11:04

Message: 9 of 25

Sorry, Ethan Leong's method works. You just need to run ccleaner and fix registry issue, and then it should work and open new m in editor only, rather to lauch another instance of matlab. It did not work in the first time, but works thereafter...

Thanks you, Ethan Leong.

Jonathan

"Jonathan Wang" wrote in message <ig0sla$m89$1@fred.mathworks.com>...
> "Ethan Leong" <chewyeong90@gmail.com> wrote in message <i8ts4r$iu4$1@fred.mathworks.com>...
> > I found the solution for this.
> >
> > Download ccleaner and run the registry cleaner. Since R2010a is uninstalled, the registry is still pointing towards R2010a. After running the registry cleaner, the problem is fixed.
> >
> > Thanks
>
> Thanks for the tip, but again, if we are already running matlab, how can we simply open the m file ONLY, rather than launch another instance Matlab and its editor?
>
> Jonathan

Subject: associating .m files with matlab

From: Jesse Sipple

Date: 19 Jan, 2011 17:41:07

Message: 10 of 25

I'm having the same problem. I downloaded the ccleaner and ran the registry cleaner but it still opens a new matlab program every time I try to open an m-file. Were there any tricks you did after running ccleaner to get it to be associated with the proper program?

I tried the link below with associating the file type to the matlab.exe in C:\Program Files\MATLAB\R2010b\bin\win64
http://www.mathworks.com/help/techdoc/matlab_env/f8-8880.html#f8-28791

I'm running 2010b on Windows 7 64-bit. Glad to see I'm not the only one with this problem.

Thanks for the help,
Jesse

"Jonathan Wang" wrote in message <ig0uh8$njr$1@fred.mathworks.com>...
> Sorry, Ethan Leong's method works. You just need to run ccleaner and fix registry issue, and then it should work and open new m in editor only, rather to lauch another instance of matlab. It did not work in the first time, but works thereafter...
>
> Thanks you, Ethan Leong.
>
> Jonathan
>
> "Jonathan Wang" wrote in message <ig0sla$m89$1@fred.mathworks.com>...
> > "Ethan Leong" <chewyeong90@gmail.com> wrote in message <i8ts4r$iu4$1@fred.mathworks.com>...
> > > I found the solution for this.
> > >
> > > Download ccleaner and run the registry cleaner. Since R2010a is uninstalled, the registry is still pointing towards R2010a. After running the registry cleaner, the problem is fixed.
> > >
> > > Thanks
> >
> > Thanks for the tip, but again, if we are already running matlab, how can we simply open the m file ONLY, rather than launch another instance Matlab and its editor?
> >
> > Jonathan

Subject: associating .m files with matlab

From: Jonathan Wang

Date: 19 Jan, 2011 20:05:05

Message: 11 of 25

Hi Jesse,

Here are steps that works for me: I closed matlab first, then ran ccleaner, ran Matlab as administrator (it gave me some error information when running the script stuff, I forgot the detail), restarted the operating system, then it works in the expected way. It should not be like this, but I failed a couple of times before I did the above. it's simply weird in my case. hehe

You can try the above steps and it should work.

P.S. the association with some other file extension (not m file) failed once, and I had to repeat the above process again to make it work again. It's indeed weird in my case.

Jonathan


"Jesse Sipple" <jesse.sipple'remove.this'@tufts.edu> wrote in message <ih77nj$lvd$1@fred.mathworks.com>...
> I'm having the same problem. I downloaded the ccleaner and ran the registry cleaner but it still opens a new matlab program every time I try to open an m-file. Were there any tricks you did after running ccleaner to get it to be associated with the proper program?
>
> I tried the link below with associating the file type to the matlab.exe in C:\Program Files\MATLAB\R2010b\bin\win64
> http://www.mathworks.com/help/techdoc/matlab_env/f8-8880.html#f8-28791
>
> I'm running 2010b on Windows 7 64-bit. Glad to see I'm not the only one with this problem.
>
> Thanks for the help,
> Jesse
>
> "Jonathan Wang" wrote in message <ig0uh8$njr$1@fred.mathworks.com>...
> > Sorry, Ethan Leong's method works. You just need to run ccleaner and fix registry issue, and then it should work and open new m in editor only, rather to lauch another instance of matlab. It did not work in the first time, but works thereafter...
> >
> > Thanks you, Ethan Leong.
> >
> > Jonathan
> >
> > "Jonathan Wang" wrote in message <ig0sla$m89$1@fred.mathworks.com>...
> > > "Ethan Leong" <chewyeong90@gmail.com> wrote in message <i8ts4r$iu4$1@fred.mathworks.com>...
> > > > I found the solution for this.
> > > >
> > > > Download ccleaner and run the registry cleaner. Since R2010a is uninstalled, the registry is still pointing towards R2010a. After running the registry cleaner, the problem is fixed.
> > > >
> > > > Thanks
> > >
> > > Thanks for the tip, but again, if we are already running matlab, how can we simply open the m file ONLY, rather than launch another instance Matlab and its editor?
> > >
> > > Jonathan

Subject: associating .m files with matlab

From: Jonas

Date: 21 Feb, 2011 19:37:04

Message: 12 of 25

-CUMBERSOME SOLUTION-
Ok tried a lot of things and nothing worked so finally:
1. Close all applications and folders, (don't have any m-files on desktop either)
2. Go to regedit HKEY_currentuser\microsoft\windows\explorer\file_assosciation [in essence, real adress is somewhat different], delete the key .m and others of interest.
3. Uninstall MATLAB
4. Restart system
5. Install MATLAB
6. Tada!


Hope this will be helpful!

Subject: associating .m files with matlab

From: Muhammad Tauha Ali

Date: 6 Mar, 2011 11:06:04

Message: 13 of 25

Easy Solution:

copy and paste this in the command window:
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.')

it's mentioned on:
http://www.mathworks.com/help/techdoc/matlab_env/rmvd_matlablink__14.html

Subject: associating .m files with matlab

From: Jonas

Date: 6 Mar, 2011 11:21:19

Message: 14 of 25

I think that is the first thing everyone with this problem tries, sadly it does not work in this case.

"Muhammad Tauha Ali" <tauha15@hotmail.com> wrote in message <ikvpqs$d6u$1@fred.mathworks.com>...
> Easy Solution:
>
> copy and paste this in the command window:
> 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.')
>
> it's mentioned on:
> http://www.mathworks.com/help/techdoc/matlab_env/rmvd_matlablink__14.html

Subject: associating .m files with matlab

From: Mammar

Date: 3 Apr, 2011 10:25:13

Message: 15 of 25

"nishant " <mishra.nishant@live.com> wrote in message <i8pmcb$doc$1@fred.mathworks.com>...
> i have uninstalled matlab 2009a n switched to matlab 2010b but now the .m files do not open..they give the option as windows do not know the file....i've also made changes to it's path n made it open with matlab C:\Program Files\MATLAB\R2010b\bin\win64 but it again launches an instance of matlab but not the file in the editor....
> I simply end up getting two or three instances of matlab but not the editor...
> i have also tried 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.');
> but it throws error saying cannot modify the registry....
> i am using win7 64bit...this problem is really irksome....please help

Hello Every body, i had also the same problem ( R2010b with Win7 64bit).
 The solution is :
1- Choose installation type: Custom
then when MATLAB asked for specify products to install (Toolboxs)
2- Diselect the first one , i.e : diselect "" MATLAB Distributed Computing serveor 5.0""
then MATLAB will ask you to select file's extensions:
3- Select all of the associate files types to open with the application
and that it ....
Hope this will help ......Enjoy

Subject: associating .m files with matlab

From: Chad

Date: 8 Nov, 2011 07:58:10

Message: 16 of 25

> Hello Every body, i had also the same problem ( R2010b with Win7 64bit).
> The solution is :
> 1- Choose installation type: Custom
> then when MATLAB asked for specify products to install (Toolboxs)
> 2- Diselect the first one , i.e : diselect "" MATLAB Distributed Computing serveor 5.0""
> then MATLAB will ask you to select file's extensions:
> 3- Select all of the associate files types to open with the application
Then reinstall
> and that it ....
> Hope this will help ......Enjoy
I tried it by not reinstalling it did not work.

Thank you so much for the solution

Subject: associating .m files with matlab

From: Steven_Lord

Date: 8 Nov, 2011 14:27:50

Message: 17 of 25



"Chad " <dr_x_man@yahoo.com> wrote in message
news:j9anei$8k9$1@newscl01ah.mathworks.com...
>> Hello Every body, i had also the same problem ( R2010b with Win7 64bit).
>> The solution is :
>> 1- Choose installation type: Custom
>> then when MATLAB asked for specify products to install (Toolboxs) 2-
>> Diselect the first one , i.e : diselect "" MATLAB Distributed Computing
>> serveor 5.0""
>> then MATLAB will ask you to select file's extensions:
>> 3- Select all of the associate files types to open with the application
> Then reinstall
>> and that it ....
>> Hope this will help ......Enjoy
> I tried it by not reinstalling it did not work.
>
> Thank you so much for the solution

Find the equivalent of this page in the documentation for your installation.
It should be in the Startup and Shutdown section:

http://www.mathworks.com/help/techdoc/matlab_env/bs6j5lz.html

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: associating .m files with matlab

From: Casper

Date: 18 Nov, 2011 16:44:14

Message: 18 of 25

I also got this problem, on one computer only;
I've got a laptop which does not display this behaviour, i.e.: when I double-click an m-file, it opens it in the editor when Matlab is already running, and starts Matlab when it isn't.
And I've got a main pc, which does display this behaviour, i.e.: when I double-click an m-file, it opens a NEW instance of Matlab WITHOUT that file in the editor.

Changing the file associations, as mentioned here several times, doesn't do anything, since m-files are already associated with Matlab (it would open access if they were hijacked).
Reinstalling Matlab does not solve the problem.

However, I did notice something odd; it opens a dos-window just before starting Matlab. Might that be the cause for the behaviour?

Subject: associating .m files with matlab

From: neiho

Date: 9 Feb, 2012 16:51:13

Message: 19 of 25

Before this solution, you should unassociate file types (i.e., .m) first.
use this tool http://www.winhelponline.com/articles/231/1/An-Utility-to-Unassociate-File-Types-in-Windows-7-and-Vista.html
then "delete file type"

"Mammar " <mammar_85@hotmail.fr> wrote in message
> Hello Every body, i had also the same problem ( R2010b with Win7 64bit).
> The solution is :
> 1- Choose installation type: Custom
> then when MATLAB asked for specify products to install (Toolboxs)
> 2- Diselect the first one , i.e : diselect "" MATLAB Distributed Computing serveor 5.0""
> then MATLAB will ask you to select file's extensions:
> 3- Select all of the associate files types to open with the application
> and that it ....
> Hope this will help ......Enjoy

Subject: associating .m files with matlab

From: Amir

Date: 21 Feb, 2012 18:34:12

Message: 20 of 25

If anybody still suffer from such problem, just let me know.

Subject: associating .m files with matlab

From: Godzilla

Date: 15 Mar, 2012 23:14:18

Message: 21 of 25

"Amir " <am.tabari@gmail.com> wrote in message <ji0o34$6h3$1@newscl01ah.mathworks.com>...
> If anybody still suffer from such problem, just let me know.

What is the final and confirmed solution to this problem?

It seems that some things work and others do not. And the help links from Matlab are all broken or of little use.

Subject: associating .m files with matlab

From: Godzilla

Date: 15 Mar, 2012 23:17:18

Message: 22 of 25

"Amir " <am.tabari@gmail.com> wrote in message <ji0o34$6h3$1@newscl01ah.mathworks.com>...
> If anybody still suffer from such problem, just let me know.

What is the final and confirmed solution to this problem?

It seems that some things work and others do not. And the help links from Matlab are all broken or of little use.

Subject: associating .m files with matlab

From: Steven_Lord

Date: 16 Mar, 2012 14:07:11

Message: 23 of 25



"Godzilla " <godzilla@tokyo.edu> wrote in message
news:jjtt4a$gk8$1@newscl01ah.mathworks.com...
> "Amir " <am.tabari@gmail.com> wrote in message
> <ji0o34$6h3$1@newscl01ah.mathworks.com>...
>> If anybody still suffer from such problem, just let me know.
>
> What is the final and confirmed solution to this problem?
>
> It seems that some things work and others do not. And the help links from
> Matlab are all broken or of little use.

Search the documentation included with your version of MATLAB for the phrase
"associate files with MATLAB" and the documentation for MATLAB will contain
the instructions for the approach that should work. If it doesn't, you
should contact Technical Support to determine what's preventing it from
working.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: associating .m files with matlab

From: dick mini

Date: 3 May, 2012 01:12:18

Message: 24 of 25

Delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m
in the registry (type "regedit" in the start menu)
and the matlab editor works and the icon for m-file is correct.
That is the key operation to solve the problem.


"nishant " <mishra.nishant@live.com> wrote in message <i8pmcb$doc$1@fred.mathworks.com>...
> i have uninstalled matlab 2009a n switched to matlab 2010b but now the .m files do not open..they give the option as windows do not know the file....i've also made changes to it's path n made it open with matlab C:\Program Files\MATLAB\R2010b\bin\win64 but it again launches an instance of matlab but not the file in the editor....
> I simply end up getting two or three instances of matlab but not the editor...
> i have also tried 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.');
> but it throws error saying cannot modify the registry....
> i am using win7 64bit...this problem is really irksome....please help

Subject: associating .m files with matlab

From: Gordon

Date: 25 May, 2012 05:47:25

Message: 25 of 25

"Feng Shengzhen" wrote in message <jnsm1i$hpo$1@newscl01ah.mathworks.com>...
> Delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m
> in the registry (type "regedit" in the start menu)
> and the matlab editor works and the icon for m-file is correct.
> That is the key operation to solve the problem.
>
Yes, this is the key,
and after this step you have to set "open" as default option for manipulating with .m files
(in folder options - file types - .m files - advanced)

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
activation key stefani 28 Jul, 2011 01:16:35
rssFeed for this Thread

Contact us at files@mathworks.com