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)?

조회 수: 59 (최근 30일)
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?

답변 (5개)

Berke Miraç
Berke Miraç 2023년 1월 27일
Open the .m file and after that you click Crtl+Shift+D. It helps dock to .m file to main MATLAB page. If it helps please vote :))
  댓글 수: 2
Steven Lord
Steven Lord 2024년 10월 9일
The shortcut key may be different on different platforms, though the operation is the same. See the "Undock Tools and Documents" section on this documentation page. I believe if you search the list of shortcuts for the word "dock" you'll find the appropriate shortcut for your platform.

댓글을 달려면 로그인하십시오.


James Connor
James Connor 2018년 1월 19일
here is the solution:
download this script and run:
then open .reg file in folder which will be created
  댓글 수: 5

댓글을 달려면 로그인하십시오.


Niraj Gadakari
Niraj Gadakari 2017년 9월 26일
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
Nagabhushan SN
Nagabhushan SN 2018년 8월 19일
편집: Nagabhushan SN 2018년 8월 19일
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).

댓글을 달려면 로그인하십시오.


Johannes Kalliauer
Johannes Kalliauer 2018년 5월 14일
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.

Yutong Xue
Yutong Xue 2020년 2월 18일
Is there a solution for MAC?
Thank you!

카테고리

Help CenterFile Exchange에서 Scripts에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by