how to undock (not dock) script editor and figure by default in 2025a?

80 visualizaciones (últimos 30 días)
Felix
Felix el 14 de Ag. de 2025
Comentada: dpb hace alrededor de 19 horas
in previous releases if i drag the script editor out (undock it) once then it would be undocked by default, but it doesn`t seems to be the case in 2025a.
Also, how to make the figure undock by default in 2025a? imo the new figure window is clunky and is not well designed.

Respuestas (2)

dpb
dpb el 14 de Ag. de 2025
Movida: Matt J el 18 de Ag. de 2025
The <documentation> specifically states that a new session should reopoen in the configuration as presently arranged when exit and then start a new session.
Save Desktop Layout
When you end a session, MATLAB saves your current desktop layout. So, the next time you start MATLAB, the desktop looks them same.
To save a layout for future use, go to the Home tab, and in the Environment section, select Layout > Save Current Layout. MATLAB stores all layouts in the settings folder. To open or manage saved layouts, click Layout and select your saved layout or right-click to delete or rename it.
If this isn't happening, report it as a bug...perhaps not terribly surprising with the new desktop arrangement that is such a major rewrite from previous.

Ritika Thusoo
Ritika Thusoo el 22 de Ag. de 2025
Hi,
You can use ‘startup’ file- a user defined script in ‘MATLAB. Here is the documentation page for your reference:
Follow the documentation page to set up the ‘startup.m’ file. You can then add this sample code to the starup file to undock by default on starting a new session:
% set(0, 'DefaultFigureColormap', autumn(64))
set(0, 'DefaultFigureWindowStyle', 'undocked')
set(0, 'DefaultFigureColormap', summer(64))
% set(0, 'DefaultFigureWindowStyle', 'docked')
set(0, 'DefaultEditorWindowStyle', 'undocked')
set(groot, "defaultFigureWindowStyle", "normal");
You can also refer the following documentations for further reference:
  1. https://www.mathworks.com/matlabcentral/answers/295706-how-do-i-prevent-figure-container-from-getting-docked-by-default?s_tid=answers_rc1-1_p1_Topic
  2. https://www.mathworks.com/matlabcentral/answers/2177771-how-to-permanently-undock-all-future-generated-figures-r2025a
  2 comentarios
Darral Freund
Darral Freund hace alrededor de 3 horas
Hi, I've been trying to get the editor undocked by default in Matlab 2025b, Update 1, but when I execute this line of code:
set(0, 'DefaultEditorWindowStyle', 'undocked')
I get:
Error using set
EditorWindowStyle is an invalid class name.
Does anyone know how to get the editor undocked by default in this version?
Thanks
dpb
dpb hace alrededor de 1 hora
s=settings;
s.matlab.editor.displaysettings
ans =
SettingsGroup 'matlab.editor.displaysettings' with properties: EnableZoomOnScroll: [1×1 Setting] HighlightCurrentLine: [1×1 Setting] HighlightCurrentLineColor: [1×1 Setting] ShowLineNumbers: [1×1 Setting] ShowOpenAsLiveScriptBanner: [1×1 Setting] DataTipsInEditMode: [1×1 Setting] ShowWelcomeToLiveEditorBanner: [1×1 Setting] DisableResetZoomKeyboardShortcut: [1×1 Setting] EnableInlineOutputFocus: [1×1 Setting] EnableSingleFileZoom: [1×1 Setting] linelimit: [1×1 SettingsGroup]
The problem with the above (probably AI generated) code suggestion is that the editor is not a graphics object and so is no setting for it in groot().
But, as the above shows, it doesn't appear there is a builtin WindowStyle for the editor, either. Let's see if can find anything about the desktop.
s.matlab
ans =
SettingsGroup 'matlab' with properties: toolboxpathcache: [1×1 SettingsGroup] fonts: [1×1 SettingsGroup] codeanalyzer: [1×1 SettingsGroup] appdesigner: [1×1 SettingsGroup] general: [1×1 SettingsGroup] commandwindow: [1×1 SettingsGroup] colors: [1×1 SettingsGroup] editor: [1×1 SettingsGroup] keyboard: [1×1 SettingsGroup]
Hmmm....the only thing there otherwise would seem to be 'general'...in older releases locally, all it has in it is the .mat file default properties. Let's see in new release, although I suspect there's no difference.
s.matlab.general
ans =
SettingsGroup 'matlab.general' with properties: randomnumbers: [1×1 SettingsGroup] matfile: [1×1 SettingsGroup] windows: [1×1 SettingsGroup]
Mmmm...that is a little different,
s.matlab.general.windows
ans =
SettingsGroup 'matlab.general.windows' with properties: AutoCollapse: [1×1 Setting]
s.matlab.general.windows.AutoCollapse
ans =
Setting 'matlab.general.windows.AutoCollapse' with properties: ActiveValue: 1 TemporaryValue: <no value> PersonalValue: <no value> InstallationValue: <no value> FactoryValue: 1
Not sure about what that actually means/controls, but no sign of any 'WindowStyle' for desktop windows.
I've not gone to one of the new desktop versions yet; with a slow bandwidth install takes so long it's something will avoid until absoutely necessry, so can't see about it's behavior here, but with the prior releases, if one sets the desktop as one wants it; somewhere that state is saved and MATLAB returns to the same configuration as when closed. One would certainly hope that behavior has been retained with the new desktop; if so that would be the workaround. If not, I'd suggest it is wll worth a complaint to Mathworks support about a quality of implementation issue at which time could turn the question into an official support request as well.

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Productos


Versión

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by