MATLAB Answers

How can I make MATLAB open .m files on the same window that is currently open (open as a new tab next to the current tab)?

71 views (last 30 days)
SOO BUM BAE on 22 Sep 2017
Commented: Getnet Demil on 23 Jan 2021
I recently received a computer from our department and tried to open .m files. (R2017a) Whenever I double-clicked them, they opened in new windows. But these new windows do not include the new .m files that I tried to open; they still had the old tabs that were open already. I also tried to drag and drop .m files to MATLAB window that was open and it didn't let me open them, showing me a circle mouse icon with a cross in it. My labtop has the same version of MATLAB (R2017a) and the things I mentioned above do not happen at all. Can anybody help me with this issue?

Answers (4)

James Connor
James Connor on 19 Jan 2018
here is the solution:
download this script and run:
then open .reg file in folder which will be created

Sign in to comment.

Niraj Gadakari
Niraj Gadakari on 26 Sep 2017
You can associate file types to the required MATLAB application. Here is the link that discusses settings to associate file types with a certain application.
  1 Comment
Nagabhushan SN
Nagabhushan SN on 19 Aug 2018
Doesn't work properly. Opens .m fles in MatLab, but in a new MatLab window. Doesn't open the .m file in the same window (already open window).

Sign in to comment.

Johannes Kalliauer
Johannes Kalliauer on 14 May 2018
I have the same problem on linux. That Matlab opens a new Window instead of a new tab, when opening a file from the file-explorer.

Community Treasure Hunt

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

Start Hunting!