how do i view two separate m files in split screen mode.

how do i view two separate m files in split screen mode. I have two separate m files that I want to scroll line by line to see the difference, how do i do this in split screen mode

 채택된 답변

Walter Roberson
Walter Roberson 2018년 6월 5일

2 개 추천

In the editor, click on View on the top ribbon. There will be a Split Document section: click on Left/right. Click back on Editor on the top ribbon and open one of the files. Click on the other plane to activate it and then you can open a different file there.
If the purpose is comparison of files, you might want to consider a different approach. In the editor when the Editor ribbon (the default one) is active, just to the right of the Save icon there is "Compare". Click on "Save and Compare with" to get to a screen that allows you to select two files. When you activate, then a file "diff" operation will be done, showing you the differences between the files.

추가 답변 (2개)

dmitry luchinskii
dmitry luchinskii 2019년 4월 2일

2 개 추천

  1. open bith files in the editor
  2. pick and drag one of the file names in the editor to the side or to rhe bottom

댓글 수: 1

Dmitry,
Thanks, but how do i reverse the action to merge it back as a tab after I am done? I found using MATLAB, it is easy to do something, but there is no 'back' button, once you do something, there is no easy way to revert back to a previous stage
Steve

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

Stephen
Stephen 2025년 8월 13일

0 개 추천

when i split the screen my original file appears in both panes. how do I load a second program in the second pane?

댓글 수: 4

Like Walter mentioned, use the "Tiles" section, not the "Split Document" section.
Do you want to view two parts of the same document? If so the Split Document section of the View tab of the Toolstrip is the right tool to use.
Or do you want to view two separate documents side-by-side? In this case, click and hold down the mouse button on the tab with the name of one of the files you want to move and drag it around the screen. You should see a blue overlay with where the document would be located if you were to release the button. If you drag it to the other side of the Editor you can show the documents side-by-side. Release the button when the document is where you want it to be displayed.
To reverse the process, click the dot between the two documents (which should turn into an X if you hover over it) or drag the document again until the blue overlay covers the entire area of the other document(s) you have open.
You are discussing the situation prior to matlab2025; The menu is different now.
Yes, the screen shot DGM posted is from an older release. I opened release R2025a, then edited two documents in the Editor and clicked on the View tab in the toolstrip when one of the documents is active. It has the "SPLIT DOCUMENT" section but not the "TILES" section.
I checked and the drag-and-drop workflow I described still works.

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

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품

질문:

2018년 6월 5일

댓글:

2025년 8월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by