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

2 次查看(过去 30 天)
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.

采纳的回答

Nivedita
Nivedita 2023-9-4
编辑:Nivedita 2023-9-8
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 个评论
Dan
Dan 2023-9-6
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by