Modifying startupsav.m/startup.m file to change new plot figure location not working

4 Ansichten (letzte 30 Tage)
When a new plot figure opens, it does so off screen. I modified the startupsav.m file by adding the line 'set(0, 'DefaultFigurePosition', [ x, y, z, h]); and changing the name to startup.m, as per the comment in the file. The only other line in the file is 'load matlab.mat', which gets executed because the workspace gets reloaded. Also, when Matlab starts, it opens across two screens. It would be nice to fix both these issues.

Akzeptierte Antwort

Nivedita
Nivedita am 4 Sep. 2023
Bearbeitet: Nivedita am 8 Sep. 2023
Hi Dan!
I understand that you are facing issues with the following:
  1. Every new plot figure is opening off screen.
  2. The MATLAB window is opening across two screens.
To address your first issue, you can follow these steps:
  1. After modifying the “startupsav.m” file, make sure that you are saving it as “startup.m” in the appropriate MATLAB startup folder. This can be found by running the following command in MATLAB:
userpath
2. Right-click the icon for MATLAB on the desktop and select “Properties” from the context menu. The “Properties” dialog box for MATLAB opens in the Shortcut pane by default.
3. Paste the path where you have saved the “startup.m” file against the “Start in” field.
4. Restart MATLAB for the changes to take effect.
The second issue is likely due to a configuration issue with the display settings or MATLAB's display preferences. You can try the following steps to resolve this issue:
  1. Open MATLAB.
  2. Go to the "Home" tab in the MATLAB desktop.
  3. In the "Environment" section, click on "Layout" and select "Default Layout".
This should reset MATLAB's layout to a single screen. If that doesn't work:
  1. In the “Environment” section, go to "Preferences" > "MATLAB" > "Desktop" and check your "Desktop Layout" settings. Make sure it's set to "Default Layout”.
  2. Restart MATLAB to see if the issue is resolved.
If the problem persists, you may need to adjust your machine’s display settings or check if there are any third-party software conflicts that might be affecting MATLAB's window management.
I hope this helps!
Regards,
Nivedita.
  1 Kommentar
Dan
Dan am 6 Sep. 2023
Thank you for the suggestions. I fixed the plot problem a while back but the second issue remains. i learned to live with it since it does not affect functionality. I think its my window manager since other applications also perform this way.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by