Editor's Note: Popular File 2018
This file was selected as MATLAB Central Pick of the Week
The program writes a Windows registry file that fixes problems with MATLAB file associations in Windows, e.g., that m-files doesn't open up in MATLAB or opens up in a new instance. Can also be used to switch file associations between different installed versions of MATLAB. Detailed help is included in the file.
Have been tested on Windows 7 for MATLAB R2012a and R2015a.
Patrik Forssén (2019). MATLAB File Association Fix (https://www.mathworks.com/matlabcentral/fileexchange/51165-matlab-file-association-fix), MATLAB Central File Exchange. Retrieved .
Create scripts with code, output, and formatted text in a single executable document.
ROBERTA NOGUEIRA (view profile)
Works like magic!
Marcelo Fernandes (view profile)
Works perfectly on Matlab 2019b on windows7
Jacob Livni (view profile)
Thank you!
Simon787 (view profile)
Great, it solved my problem very well.
Marco Lo Cascio (view profile)
Jedrzej Szczepaniak (view profile)
Dimitrij Chudinzow (view profile)
Wei-Lee Wu (view profile)
This was easy to use and fixed my issue instantly!
Vasileios Pettas (view profile)
Christos Makrides (view profile)
LAMBERT William (view profile)
Works perfectly on Matlab 2019b on windows10
Lorenzo Longo (view profile)
Mohanad Al-Ibadi (view profile)
Worked on Matlab 2019b. Thanks.
Han (view profile)
Works successfully with R2019b on Windows 10
SLC (view profile)
Works with R2018a on windows 10.
Gabriel (Naiqi) Xiao (view profile)
Xin-Wei Huang (view profile)
Tom R (view profile)
Bryan Hijnekamp (view profile)
K K (view profile)
Works with r2019a! Great! Thanks!
masterfelu (view profile)
Works with r2019b! Great! Thanks!
Le Xuan Thang (view profile)
Perfect!. Thank you so much. r2018a
JI SOO KIM (view profile)
WOW!! It's like a magic! Thanks!
Work perfectly with matlab 2019a!!
Patrick-Nigel Hildebrandt (view profile)
Works perfectly on Matlab R2017a!
Kyle Wright (view profile)
This worked!
Just in case this might be useful for someone else: my network blocked the registry file from running on my non-admin account (and right-clicking the .reg file didn't yield a "Run as Admin" option), so I had to open a command prompt as admin and execute "Regedit MatlabFileAssocFix.reg" to update the registry files. That proved successful though.
Jorge Rojas (view profile)
excelent
Alfredo Ceseña (view profile)
Works perfectly with matlab 2018a on windows 10
gonzalo quezada (view profile)
Ying Huang (view profile)
Hossein Mapar (view profile)
Jessica McKee (view profile)
Davit Harutyunyan (view profile)
grigory yashin (view profile)
John Callahan (view profile)
Maria Jose Luque (view profile)
Many thanks, worked fine on Matlab 2019a on Windows 10.
Bruno (view profile)
It worked for me. I was having .m files openedd at Notepad and .mat files oppend at Microsoft Access ! Now both format files are being opened at Matlab, in a single instance. I use Matlab 2018a, Windows 10. Thank you for the developer.
Jiming Sheng (view profile)
Alex Salmon (view profile)
Carl De Vries (view profile)
Jakob Hornung (view profile)
worked perfectly (Win 10, R2019a), many thanks!
Tuong Nguyen (view profile)
Struggled to set new version of Matlab as default program to open Matlab files and then found this thread. Very useful script!
Rehan Qasim (view profile)
how to associate .mlx (live editor file)?
Michael Shiplyuk (view profile)
fixed problem for my win10 2017b
Youn Kyung Song (view profile)
I love you !!!! It fixed all the hassles of opening multiple instances at every double-clicking of .m files!!!!!
Sara Battaglioli (view profile)
fixed my problem with 2018b
Karen Adler (view profile)
Penning Yu (view profile)
it works well for my 2019a.
Hongseok Jeong (view profile)
Adam Danz (view profile)
Fixed my problem with r2019a. Thanks for making that solution so simple!
Gennaro Principe (view profile)
Zubair (view profile)
Works good. Tried on MATLAB 2018a with Windows 10. Solved annoying issue : clicking on .fig or .m or .mat file, a new Matlab instance was opened. After running function, close all Matlab instances, and click on generated Registration entries file, restart Matlab
pankaj singh (view profile)
But it still opens the whole Matlab session, even if I just want to open the Matlab figure file. How to solve that?
fhz (view profile)
It works like a charm!
Finally I can open files from folders without starting a new session of Matlab.
Yusuke Nakata (view profile)
It worked for 2019a.
Viet Anh (view profile)
Worked on Matlab 2016a. Thank you very much!
R (view profile)
Sura Salih (view profile)
Thanks a lot for your effort , it worked on 2018b version win 7 64 bit
Sixian Zhang (view profile)
I uninstalled R2018b after installing 2019a on Windows 10, then it always opens up a new MATLAB instance when double-clicking on .m files.
This file fixed the problem perfectly!
Thank you so much!
Mathieu Walsh (view profile)
Read the instructions and it will work perfectly.
Ekaterina Kazakova (view profile)
Thank you so much! It helped for Windows 10, MATLAB R2019a
yong xingwang (view profile)
It works, thank you very much!
Cristiana Traman (view profile)
Thank you so much! (Windows 7 2017b)
Sebestény Dániel (view profile)
thank you, it works perfectly!
SEFA OZCOSAR (view profile)
Sam Deng (view profile)
thank you very much!! this is very helpful!!
Dimitrij Chudinzow (view profile)
Thank you very much! Great Work!
Chaitanya Awasthi (view profile)
Worked like a charm!
Sadettin Durmus Talipoglu (view profile)
This code solved the same problem. Thank you for your sharing.
Eduardo de la Rosa (view profile)
It worked perfect!
Aya Tarek (view profile)
Works on R2017b Windows 10
Thank you!
Anthony Shupenko (view profile)
My problem is that m.files, .slx files etc. keep on defaulting to Adobe... so, tiles in this download shows as a PDF and does not work.
Mahdi Aziz (view profile)
Thank you!
SIN YONG TAN (view profile)
Work like magic!
Yoganandam Vivekanandham Pushpalatha (view profile)
Siyao Hu (view profile)
Richa Dubey (view profile)
Kuifeng Zhao (view profile)
Alicia Buster (view profile)
Matthew Bayer (view profile)
Dustin Cook (view profile)
Worked great for me for Matlab 2018b in Windows 10.
Steps:
1) Run the Matlab File to create the registry file
2) Run the created registry file
ding dong (view profile)
Guodong Cui (view profile)
TK (view profile)
Vojtech (view profile)
Simple, fast and perfect (Windows10, 2018b). Thanks!
Dustin Rhodes (view profile)
Luca DI Stefano (view profile)
It didn't work for me
Suleyman Serhani (view profile)
doenst work
stich abdou (view profile)
nesta3ref bik
Christopher2017 (view profile)
Amritpal Sidhu (view profile)
Fixed file association problem with windows 10 and R2018b
BURAK CIHAN (view profile)
I was facing with defined problems in above. Simple to use and works perfectly!
Omid Khademhosseini (view profile)
perfect....
Kaixiang Wang (view profile)
Pradeep Sathyanarayana (view profile)
Worked like a charm. For people having errors showing that "Cannot write registry file". Restart MATLAB and run as administrator. Follow the instructions in the file and done!
THAMIZHARASAN PALANISWAMY (view profile)
Works Fine with R2018 Thanks
Andrea Bovino (view profile)
perfect with R2018b. Spent hours to figure out how to associate, before finding this
DongYoung Kim (view profile)
Worked perfectly with R2018b on Windows 10 Pro! Thanks!
Jake Johnson (view profile)
Thumbs up! Woks perfectly for 2018a.
Borhan Hamedani (view profile)
Works perfect. Do not forget to run your MATLAB as administrator
Shanaka Ramesh (view profile)
can someone give me the steps. i use MATLAB 2018b with windows 10
Vighneswara Siva Santosh Kumar Kondeti (view profile)
Worked with Matlab R2017b.
Leone Campos (view profile)
All right! (R2018a)
Maybe you can fix '.mlx' too! :D (file extension of Matlab Live Script)
Marvin Gildehaus (view profile)
Worked perfectly with R2018b on Windows 10 Pro!
Lucas Moreira (view profile)
thanks
sivan levi (view profile)
worked great windows 10 matlab 2018b
Carolyn McClaskey (view profile)
Thank you very much! Works great
tesarj13 (view profile)
Great! (2018a)
James Ratti (view profile)
Failed to create registry file.
noy guzi (view profile)
Claire (view profile)
Vaidyanathan Sethuraman (view profile)
Perfect!!
A. Villafranca (view profile)
Galen Hoffman (view profile)
This worked beautifully for 2018b. Thank you 8D
Andrew Riali (view profile)
Worked perfectly for 2018b! Thanks!
Yurii Elkyn (view profile)
Worked for 2017b. Thanks!!!
Samantha Irvin (view profile)
Shokoofeh Parvin (view profile)
Worked for 2018a Win10, many thanks!
Mohammed Khallaf (view profile)
It worked very well on MATLAB 2018a win10.
Pierre Vogler-Finck (view profile)
Adithya Naresh (view profile)
I accidentally associated my .m files to Matlab.exe, which then started opening Matlab every time. This file helped fix that problem by updating the registry directly just by simply running the function and running the .reg file that is created. Thank you Patrik for making this!
guru prakash (view profile)
saved my life.
leukosaraphs! (view profile)
work for MATLAB R2015a in Windows 10.
Thank you Mr! Hats off to you!
Arun Kashyap (view profile)
Worked perfectly on MATLAB R2018a
kayor (view profile)
Roman Luc (view profile)
Luca Freilino (view profile)
Ronald G. Andrade (view profile)
It works for 2018b :) !!
Kian Kalan (view profile)
doesn't work on 2018b
Ian Linsmeier (view profile)
Jan Palecka (view profile)
Aymen Dehmani (view profile)
Max Vrany (view profile)
Fei Jia (view profile)
One of the best functions that I've used in matlab. Works for 2016a on win10.
Keith Hernandez (view profile)
Wow. Thank you.
I had updated my Matlab version and the registry would not find 2018a version. This was done on a Windows 7 64bit. As soon as I ran the registryfix file everything worked again.
Again, Thank you
Yu Chou (view profile)
Working on win 64bit Matlab 2017b. Thanks to you!
Flag Yan (view profile)
Works on my win10 64bit + Matlab 2018, many thanks!
Avimy (view profile)
work just fine on windows 10 thank you !
Jacob Hensel (view profile)
Vishal Raveendranathan (view profile)
Nagabhushan SN (view profile)
Carlo Guarnieri Calò Carducci (view profile)
Thank you very much! Works like a charm with Matlab 2018a on Windows 7
Boris Benedikter (view profile)
Thank you very much! It works for Matlab R2017a on Windows 10.
Peter Latta (view profile)
Works for Matlab R2015b on Windows 10
Gustavo Fonseca (view profile)
Doesn't work for R2017b for Windows 10.
lucas lenne (view profile)
Works on Windows 10 for MATLAB R2017a
Lincoln Satterthwaite (view profile)
Works for 2018a on windows 7.
Chih-Ta Wu (view profile)
Working on 2017b
Alexandru Tatomir (view profile)
Khalil Sidawi (view profile)
Christelle Zielinski (view profile)
vishnu kavali (view profile)
working on windows 10 MATLAB 2016a
Martina Raffellini (view profile)
Rais Badshah (view profile)
Thanks a lot! it works with MATLAb 2016a/win 10-64.
Eleni Vasilakou (view profile)
Perfect! Works for Windows 10, Matlab R2018a. Thank you!
Yunhe Yu (view profile)
Works! Win 7 Matlab2017b.
Thanks a lot!
Valeria di Battista (view profile)
Henrique Furtado (view profile)
Casey Heidrich (view profile)
Working, Windows 10 R2018a Update 2
Mohamad Aramesh (view profile)
Langchen Fan (view profile)
Alex Salmon (view profile)
Fauzan Adim (view profile)
shoubhik karmakar (view profile)
Enrico Spigarolo (view profile)
Berat Dogan (view profile)
Adnan (view profile)
Marco Capello (view profile)
dasha negri (view profile)
Yasheen Brijlal (view profile)
heng ma (view profile)
excellent and very convenient!
Ranjan (view profile)
excellent work by the author - now please add live code MLX File (.mlx) files to your program
Guan-Wen Chen (view profile)
Zhenbiao Zhou (view profile)
Solved my problem! Thank you so much!!
BO FAN (view profile)
It solves the problem. Thank you very much!
Vikaasa Kumar (view profile)
Johannes Kalliauer (view profile)
Is there a version for Linux? I have the problem "opens up in a new instance"
Alessandro Negri (view profile)
Working for R2018a, thank you!
Lígia Martins d'Oliveira (view profile)
Thank you, worked perfectly on R2018a, Windows 10
Ian McLane (view profile)
Serge (view profile)
Why can this not be done through MatLab preferences... shame shame MathWorks.
Manuel Morales (view profile)
Thank you!! this works perfectly
Diego Ulisse Pizzagalli (view profile)
MP (view profile)
Worked perfectly for 2018a
Daniel Derrick (view profile)
Daniel Derrick (view profile)
Didn't work for me. 2018a.
Simon Brauer (view profile)
Perfect! It works. Matlab R2018a on Windows 7.
francis chan (view profile)
Raj N (view profile)
Ou Weike (view profile)
It works. Thanks.
Carlos Eduardo Silva de Souza (view profile)
Works! Don't forget to run Matlab as administrator, though.
pjman yucifee (view profile)
perfect...tnx
Samvith Vasudeva Rao (view profile)
aziz.cust (view profile)
Safdar (view profile)
Works. Matlab R2018a on 64-bit Windows 10
Eric Noordam (view profile)
Thijs Boehme (view profile)
Nirjhor Chakraborty (view profile)
Giridharan Karunagaran (view profile)
Worked perfectly on win10 with matlab 2017b
Zubiao Xiong (view profile)
Junze Liu (view profile)
Works for my R2018a on Windows 10 platform!!! Feel like the messy world has been saved!!! Thank you, MATLABman!
ewald strasser (view profile)
made my day :-)
Rinse Liefferink (view profile)
Works good!
Sina Hadipour (view profile)
Thank you sooooo much, microsoft is really getting on my nerves with their forced updates that screw up everything. Thanks for the fix
Md Nazmul Azim Beg (view profile)
Nice. It worked fine for Matlab 2018a in windows 10
Thanmay Sunil Menon (view profile)
Works on 2018a...But doesn't associate .mlx
Stefan Dukic (view profile)
Indeed, works for Matlab R2018a ... Brilliant!
Pierdomenico Schiano (view profile)
Perfectly work also on Matlab R2018a
Polyzois Bountzis (view profile)
Jason Randolph (view profile)
I can't believe how bad Microsoft has messed up the Windows 10 interface for assigning default programs based on file extension. Utterly pathetic. I couldn't find any way to release .mat files from Access and remap to MATLAB no matter what I did.
Your tool provided the perfect fix. Thank you so much!
Elizabeth Agee (view profile)
Jessica (view profile)
Do you have a version of this for Mac computers?
Mertcan Kaya (view profile)
robertosangi (view profile)
It works perfectly with Matlab R2017a!
Andrew Korolkov (view profile)
Nan Luo (view profile)
Austin Fite (view profile)
Worked for me, thank you!
Carlos Armando Estrada Torres (view profile)
Works perfectly on MATLAB R2016a on windows 10, Thank you so much.
DS Chen (view profile)
Works for 2015b
Daniel John (view profile)
Fiddin Yusfida (view profile)
Amazing!
It worked on Matlab 2017b
Felipe Contreras (view profile)
Now I can't access any files from my computer in matlab. How do i fix that.
Florent Halgatte (view profile)
Krzysztof Wascinski (view profile)
works on Windows 10. Thank you !
Luca Amerio (view profile)
Had a tricky situation with MATLAB installed on a shared drive for which I didn't have writing rights and each time I double clicked a matlab file it opened in a new instance.
This solved it as a charm! AMAZING!
MohammadReza Ebrahimi (view profile)
Mayowa Aregbesola (themaze) (view profile)
Mayank Chetan (view profile)
furkan isildak (view profile)
Alp Sayin (view profile)
James Connor (view profile)
Roberta Mancini (view profile)
Very nice program! Fixed my problem in 3 minutes :)
Josh (view profile)
Yanis Bouhraoua (view profile)
Eric Yuen (view profile)
Worked perfectly, thank you!
Pavel Benes (view profile)
Maziar Golestani (view profile)
Kendall Hunter (view profile)
AWESOME
André Larsen (view profile)
zhongrui wang (view profile)
Great job
Yingchun Li (view profile)
worked for 2016b, good
Zhaochen He (view profile)
wow it worked for 2017a
msn (view profile)
superb! working perfectly. Thanks a lot
L.A. Bras (view profile)
Eoin Horgan (view profile)
flyoverpeak (view profile)
Thanks very much! It's necessary to run matlab as admin.And remember reboot,then okay!
Ian (view profile)
Citizen Insane (view profile)
Hugo (view profile)
Fatih Kendir (view profile)
Thank you very much. It worked for 2016a.
Mohamed Karam-Allah (view profile)
2017b working, thanks
same steps as said before
NOTE: Turn off anti-virus and UAC
1) Run Matlab as admin
2) put associateFiles.m in ....matlab folder ....mcr\toolbox\matlab\winfun\private
3)open and execute associateFiles.m
4) Execute the command (in matlab command window)
associateFiles('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc',['.' mexext]});
5) You will get regfile MatlabFileAssocFix.reg, run it
Mohamed Karam-Allah (view profile)
2017b working, thanks
same steps as said before
1) Run Matlab as admin
2) put associateFiles.m in ....matlab folder ....mcr\toolbox\matlab\winfun\private
3)open and execute associateFiles.m
4) Execute the command (in matlab command window)
associateFiles('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc',['.' mexext]});
5) You will get regfile MatlabFileAssocFix.reg, run it
Brayan Torres Z. (view profile)
This function works , but i would like to know more, in line 100, what does the variable 'fileExtCell' mean,
specially its columns 3-5, in order to add latest extensions. For example, I added one row more
{'mlx', 'MATLAB Live Script', [], [], []},
but files with this extension are not shown with the appropriate icon and can't be opened outside Matlab.
Joseph Huang (view profile)
Works perfectly, thanks
Sietse Braakman (view profile)
This works great. I also added ".sbproj" as an extra argument [ associateFiles('add','.sbproj') ] to allow Windows to automatically open SimBiology projects as well.
ahmed elkholy (view profile)
Thanks a lot.It works.How do I associate .mlx file? Windows10+R2017b
Uri Burmester (view profile)
Awesome.
Sam (view profile)
2017b working!
David Lopes (view profile)
Berg Bill (view profile)
Thanks, this problem has troubled me since the version of 2014a, the registry file worked on 2017b!
ahmed almanea (view profile)
THANKS ALL GOOD
Bui Tuan (view profile)
It used to work until the Fall Creators Update i.e., Windows 10 ver 1709 build 16299.15, comes in and screwed everything up with their UWP default program association.
The current only way to work around this is that you HAVE to START MATLAB by opening a .m file. Only then all subsequent .m files will be opened in the same MATLAB instance.
I really hope that this script gets an update to fix this.
Hector Munoz (view profile)
Wu Di Wu (view profile)
Thanks a lot.It works.How do I associate .mlx file? Windows10+R2017b
Apostolos Athanasiou (view profile)
Thanks a lot. It works perfectly! Windows 10 and matlab 2017b!!
Xu Shen (view profile)
THANK YOU THANK YOU! This is a really great tool!!!!!!!! So GRATEFUL! (R2017a) It works well!
Mads Christian Baungaard (view profile)
I upgraded from 2015b to 2017b today, and after the upgrade I couldn't dobule click open my m.-files. Downloading the script to my desktop and following the instructions of Muhammed Hafish solved the problem. Thanks!
Simone Rupp (view profile)
Thank you thank you thank you! I tried all the official problem solving ideas provided by "MATLAB answers" but none worked, but this solution did! (Matlab 2017b + Win 7)
You saved my day...
Riccardo Felicetti (view profile)
Good job! (Matlab 2017b + Win 8.1)
Muhammad Hafish (view profile)
it works for R2016a, thank you
for those who still struggled with this problem, thanks to Yannis Gr, here what i did
1) Run Matlab as admin
2) Open and execute associateFiles.m
2) Execute the command (in matlab command window)
associateFiles('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc',['.' mexext]});
3) You will get regfile MatlabFileAssocFix.reg, run it
4) Restart pc or kill explorer.exe and run it again
5) Finish
Erwin Hoogerwerf (view profile)
Zhixiong Zhao (view profile)
It works for 2016a! Thanks
Fritz (view profile)
trad123 456asd (view profile)
It does work for MATLAB R2017b, but Windows 10 1709 RTM 16299.15 (Fall Creators Update) HAS A F***ING BUG (AS ALWAYS) with the File Association and the Settings UWP....
trad123 456asd (view profile)
It does Not work for MATLAB R2017b, Windows 10 1709 RTM 16299.15 (Fall Creators Update)
Yinqiao Wang (view profile)
Works on R2017b
Junwoo Park (view profile)
It works! @ Windows 10/ 2015a
1) Execute the included file(associateFiles.m)
2) New registry file(.reg) is generated, [MatlabFileAssocFix.reg], where the above m file is located.
3) Execute the registry file
4) Restart the PC
Kallol Bera (view profile)
Thank you very much. It worked. You saved my day. Following these instructions from Yannis Gr:
"A bit more help on how you should do this.
1)Download the file
2)Extract the file @ C:\Program Files\MATLAB\R2016a\mcr\toolbox\matlab\winfun\private . Change the R2016a according your version of course.
3)Navigate inside matlab to the same dir as above. (Run matlab as admin also)
4)Execute the command associateFiles('add',{'.m','.mat','.fig','.p','.mdl',['.' mexext]});
5)Take the .reg file it will create copy paste on desktop and run it.
%% This is the part which works with most of MATLAB File associations
associateFiles('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc',['.' mexext]});"
Christoph Neukamp (view profile)
Huayan Wang (view profile)
Wei Chen Esmonde Lim (view profile)
Worked on R2017a. Better than any MATLAB Answers. Thumbs up!
JZ85 (view profile)
Worked with R2015a on Windows 10, though you have to confirm .m-files to be open with MATLAB (the typical Windows popup)
Lin Ken (view profile)
It works! Excellent!
Moses (view profile)
Thank you!
Steve (view profile)
Francesco Lonis (view profile)
Worked on Matlab R2017b. Thank you. Following these instructions from Yannis Gr:
"A bit more help on how you should do this.
1)Download the file
2)Extract the file @ C:\Program Files\MATLAB\R2016a\mcr\toolbox\matlab\winfun\private . Change the R2016a according your version of course.
3)Navigate inside matlab to the same dir as above. (Run matlab as admin also)
4)Execute the command associateFiles('add',{'.m','.mat','.fig','.p','.mdl',['.' mexext]});
5)Take the .reg file it will create copy paste on desktop and run it.
%% This is the part which works with most of MATLAB File associations
associateFiles('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc',['.' mexext]});"
Francesco Lonis (view profile)
Worked on Matlab R2017b. Thank you.
Gustavo Forte (view profile)
Florian Rothermel (view profile)
ahmad eldeeb (view profile)
how it works in matlab 2016b on win7?
Chingizbek (view profile)
Hüseyin (view profile)
Thank You!!!
Brandon Armstrong (view profile)
Works on R2017a with the caveat that .mlx files (MATLAB Live Scripts) are supported. As stated, was tested on R2012a and R2015a so to be expected.
Juan Dionicio (view profile)
Excellent on 2016b
Tulike (view profile)
LING XIAO (view profile)
Your file solved the problem that bothered me for a long time. Thanks a lot.
Huihua ZHAO (view profile)
Works like a charm. Thank you so much!
zhenhua Li (view profile)
Rui Zhang (view profile)
Thank you so much dude! It works perfect on win 10 x64 R2015b!
Logia Uchiha (view profile)
GJ! Works on Win 7 x64 R2016b! Thanks!!!
Ahsan Abbas (view profile)
Zhengyi (view profile)
Khris Griffis (view profile)
Works on 2017a here. Running MATLAB as Admin (win10) does the trick. To get the matlab icons to show up, right-click on one of the newly associated files (.m or whatever) go to Properties. Click "Change" next to Opens With and select the MATLAB 201x* option which be at the top of the list (and have "New" next to it). Do that even if MATLAB 201x* alreadyappears next to Opens With.
*x denotes your version of MATLAB.
Francisco Rodriguez (view profile)
Works like a charm!, great work!
sercan demirkiran (view profile)
Thanks a lot Patrik. You are champ!
Shreeprasad Bhat (view profile)
Excellent.
Juan José Gómez Belotto (view profile)
Works on r2015a thank you! How can we shows the default icon for the files?
Kevin (view profile)
Good, it works on r2017a. However, .m files do not shows the default icon of MATLAB.
Le Quan (view profile)
Efe Ilicak (view profile)
Worked like a charm! Thank you Patrik!
Rey9 (view profile)
Islam Alam (view profile)
Worked on MATLAB R2017a
Answer by Yannis Gr. on 16 Jun 2016
Edited by Yannis Gr. on 16 Jun 2016
A bit more help on how you should do this.
1)Download the file
2)Extract the file @ C:\Program Files\MATLAB\R2016a\mcr\toolbox\matlab\winfun\private . Change the R2016a according your version of course.
3)Navigate inside matlab to the same dir as above. (Run matlab as admin also)
4)Execute the command associateFiles('add',{'.m','.mat','.fig','.p','.mdl',['.' mexext]});
5)Take the .reg file it will create copy paste on desktop and run it.
%% This is the part which works with most of MATLAB File associations
associateFiles('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc',['.' mexext]});
Tugrul Artug (view profile)
Worked on Win10 R2016a. Thanks.
Nick Durkee (view profile)
Didn't work on Matlab R2017a
vthuongt (view profile)
YanXin Zhang (view profile)
It works perfectly in Matlab R2015b in Windows Server 2016! Thanks!
Edson David Cifuentes Gómez (view profile)
Works amazingly well Thank You! r2016a windows 8.1 x64
zhu zheng (view profile)
good job
works for r2016b windows 7
DrPrado (view profile)
Works like a charm! r2015a, Windows 10 64 bits.
abraham (view profile)
Thanks! It works in Matlab R2016a in Windows 10!
AA (view profile)
Works for R2016b! Thanks a lot !
Mohsen (view profile)
Edgardo Villar (view profile)
It works perfectly in Matlab R2016b in Windows 10! Thanks!
Mustafa (view profile)
Perfect
Germano Scarabelli (view profile)
Great work. Perfect for R2015a.
Gorky Shaw (view profile)
perfect for R2016b
kaushal sharma (view profile)
ann chen (view profile)
works perfect on MatLab 2016a in Win7!
Km (view profile)
Carmen Van den hoven (view profile)
Perfect! Thanks!
Antoine Bahizi (view profile)
It works on MatLab 2016a. it saved my time. Thank you.
Pedro Busc (view profile)
Jhacson Meza (view profile)
Xiangyi Yu (view profile)
It works, one line sublime fix.
Sérgio M. A. Cruz (view profile)
Excellent! It solved my issue!
Qingyu (view profile)
Super Effective!!!
ahmed ahmed (view profile)
the File is good. but the method given by karim baa is the best
thank you very much,
i tried it with 2015a
karim baa (view profile)
Perfect works on 2016b\win10, just follw all the steps : 1)Run "associateFiles.m.", 2) Exit matlab, 3) double click generated "MatlabFileAssocFix.reg", 4) restart pc.
wei-quan chen (view profile)
Felipe de Jesus Martinez Martinez (view profile)
Excellent!! Perfect!!
Thank you very much!!
yang hong (view profile)
perfect!
wenyu yang (view profile)
Zvonimir Fuduric (view profile)
Mustafa Al-Qaisee (view profile)
Huy (view profile)
Thanks a lot. I was about too reinstall Matlab just to fix this stupid file association. But this saves me a lot of time and efforts. I can' thank you enough.
Jianhua LIU (view profile)
great! works well @ win7 2016a
Yang Yao (view profile)
Nice job
felix cyc (view profile)
NICE PLAY
Jie (view profile)
GOOD
Masoud Rezazadeh (view profile)
Thanks Patrik
It's nicely work for me
Zhang Liang (view profile)
Wish that .mlx file would be associated.
Gene. Lin (view profile)
maybe my matlab was bad T.T , It's not working. still thank you .
Anderson Nascimento Nunes (view profile)
Mark (view profile)
Works!
Mohamed Kassab (view profile)
thank you so much, worked perfectly
Ermin Gong (view profile)
perfectly figure it out, fatastic!!!thank you so much! matlab2016b,win10
Jerome Kodjo (view profile)
Works perfectly for R2013a on Windows 8.1. Nice job! Thanks.
Bryan Jin (view profile)
Works for R2016b, windows7.
Hakan Erdol (view profile)
Solved my problem. Thanks Mathworks
Jonathan (view profile)
how to associate live scripts "*.mlx" files please?
Iasonas Tselos (view profile)
filipee77 (view profile)
It worked!!
Ashhar (view profile)
Thank you so much!
DerDruide (view profile)
Thanks! Helped as accepted 2015a
Fan Hi (view profile)
Thanks, but it doesn't seem to work on 2016b(Win10 x64 1067)
Bilal Yuruk (view profile)
Thanks!
lang xiaozheng (view profile)
thanks.
Laurens (view profile)
Doesn't seem to work with R2016b on Win10
xuguang (view profile)
Vikrant Karale (view profile)
Nice Job. Thanks for making it so easy.
Carlos (view profile)
Thanks!!!
npn bkck (view profile)
ahmed (view profile)
worked for MATLAB 2016a, thanx very much.:)
blue bird (view profile)
Works perfect with R2016b. If the .reg file won't work, just copy it into another folder and start it.
Baptiste P (view profile)
Thanks !!
Ali Mahdavi (view profile)
2016a - Windows 10, Worked. Nice!
Vaibhav Deshmukh (view profile)
This doesn't work for 2016b. Can you help me with this?
Dimitrios Ataloglou (view profile)
Excellent work! Thanks!
Mushfequr Rahman (view profile)
Perfect
João Brito (view profile)
Antoine Bahizi (view profile)
Thank you. It worked on Matlab 2016a on Windows 10 Pro.
Phonon007 (view profile)
Worked!
Jon17 (view profile)
thanks bro!! It worked on Matlab 2015b on windows 7
AleJoCastro (view profile)
It works very well for me! Thanks a lot!
Antonio Morales (view profile)
Excellent! Thanks very much!
Igor J. (view profile)
Thanks very much!
Santiago Molina (view profile)
Thomas Thuruthel (view profile)
Serge (view profile)
Fixed my problem of a new MatLab session being started every time I open a m file. Life Saver!
Darien Gonzalez (view profile)
Youasakura (view profile)
Worked on Matlab R2016a on Windows 10 64bit
Youasakura (view profile)
Pi Ting (view profile)
JerryP (view profile)
Michele Scalseggi (view profile)
Mohamed Atyya (view profile)
slx files is not associated
Mohamed Atyya (view profile)
Carla Barquest (view profile)
Jiangtao Yu (view profile)
Thanks very much!
It work for Matlab r2016a on Windows 10 (1607).
Jordan Stoyanov (view profile)
hergezer (view profile)
Bo Di (view profile)
user (view profile)
works win 7 R2016a
Ruban Sugumar (view profile)
Works perfectly for R2016a. Thank you Patrik Forssén.
mm (view profile)
Khris Griffis (view profile)
Great submission! Still works 2015b (student) Win10x64.
L Amy (view profile)
Thanks a lot!
Yannis Gr. (view profile)
works great but it left all my .fig .m icons blank white.
Ken Garrard (view profile)
Thank you! This is much better than re-installing R2016a. Curiously, it removed R2012b from my open-with menu but R2014a, R2014b, R2015aSP1 and R2015b are still there.
firas firas (view profile)
It's working for me(R2016a) but you have to run the created 'MatlabFileAssocFix.reg' file outside matlab manually.
Great job thank you
Witu Witukas (view profile)
Carmine Gno' (view profile)
Thanks a lot! A much needed fix!
Guido Marco (view profile)
Excellent!! it works very well (Matlab 2015b - Windows 10)
winshepherd (view profile)
Fantastic.It works well on windows 10 for matlab 2016a. Thank you!!
winshepherd (view profile)
Fantastic.It works well on windows 10 for matlab 2016a. Thank you!!
Bin Du (view profile)
Amazing! windows10 and Matlab2016a, it works!
Fang He (view profile)
Carlos Colon (view profile)
WOW thanks so much buddy!! Works with R2016a in Windows 10.
Andrew (view profile)
Thank you!! Worked perfectly!
Ram (view profile)
Absolutely Brilliant! Solved the problem...
Alex K (view profile)
Ttzax (view profile)
JimmyTeng (view profile)
how can I download it?
keyur patel (view profile)
Ali Alalfy (view profile)
Zhiyi TANG (view profile)
works with MATLAB 2016a, Windows 10 X64
Brendan Hamm (view profile)
Absolutely brilliant! You may want to consider having this allow multiple versions of MATLAB as you can no longer choose older versions for the Default afterwards without of course deleting the current default. It would be nice to be able to do this in Windows still afterwards.
Zhipeng Cao (view profile)
Thanks! Problem solved.
Denis Anikiev (view profile)
Muhammad Abdulrasool (view profile)
man, you are amazing.
It's work with me and it is fantastic.
Hakim Cheikh (view profile)
Antonio Fortes (view profile)
Brilliant!!!
Alexander Fedirko (view profile)
M S (view profile)
I can't even count how many hours over the years I've been frustrated by this silly problem, and all the failed suggestions in various forums, including mathworks. Thanks for this submit, A+++
Liam Daly (view profile)
Biagio Sca (view profile)
hi, not work on my Matlab version
Lei (view profile)
Marcus (view profile)
Wojciech Glapiak (view profile)
Ganesh Sivaraman (view profile)
Tom Mot (view profile)
Heriberto Sanchez (view profile)
Gracias =D !!
Funciona perfectamente
Matlab 2015a | win 10
OJO: Si crees que no funciona, solo hay que leer las instrucciones que están dentro del archivo .m
Saludos
Thales (view profile)
Thanks!!! Worked perfectly!!!
Matlab 2015a and Windows 10
jose verdugo (view profile)
Muchas Gracias!!! Funciono a la perfección Matlab 2015b
jeff grahams (view profile)
please help, new to matlab , how do i add this file to matlab path so that it correct the file association issue, thanks
Pedro Busc (view profile)
Jose Quintero (view profile)
umurkarabulut (view profile)
Unbelievable. Amazing.!!! It works even with 2015b. I screwed up my pc before use this script but it fixed all the bugs. Thanksxx
firstname lastname (view profile)
Josh Parks (view profile)
thanks man, cakewalk. Can't believe windows doesn't do this automatically, mac has no issues
Faker Black (view profile)
worked well
Chien-Chun (view profile)
Allan Fong (view profile)
wow okay, I commend you for this - most of lifelong problems now solved :D
Yin (view profile)
Andrea (view profile)
EkoSusatio (view profile)
Thank you for the solution. It work very well
alex (view profile)
I am really disappointed that this didn't work either. I am using R2014b and associated file is still the Starter Application, and clicking the .m file right now only opens a new instance MATLAB, not even a new instance of MATLAB with its editor open with the file. I'd be happy to hear any suggestion anyone gives.
H. Birkan (view profile)
Tried many things for R2015a and this one worked perfectly, thanks
Manolis Trypakis (view profile)
Worked perfectly. Had tried a lot of different proposed solutions in the past but this is the only one that actually worked (2015a). You saved me a lot of headaches :) Thanks!
J. Domann (view profile)
worked perfectly
Dev-iL (view profile)
majnun1337 (view profile)
Frederik Boehle (view profile)