Change default IDE layout

15 visualizaciones (últimos 30 días)
James Johnson
James Johnson el 10 de Feb. de 2016
Comentada: James Johnson el 20 de Oct. de 2020
I have saved a custom layout (on the environment tab) which works much better for my multi-screen set up. Unfortunately I have to manually tell Matlab R2015b to load that custom layout every time it starts up. This is tedious and in previous versions (R2011b) I was able to change this so that it loaded my custom layout every time. How do I do this in Matlab R2015b?
Can one set a custom layout as default? Alternatively, is there a setting which will cause Matlab to load the most recently used layout every time?

Respuesta aceptada

sam0037
sam0037 el 15 de Feb. de 2016
Hi James,
The most recently used layout is generally loaded in MATLAB R2015b too. I have tried the same successfully. You can try one of the following to load a recently used or custom layout:
  • The layout is loaded from the preference settings of MATLAB. You can create a new preference settings and then create and save the custom layout. Click here to know more about creating a new preference settings.
Try the below workaround if the above doesn't help.
  • You can load the desired layout programatically whenever the MATLAB starts using the STARTUP.M file which is explained here.
The following 3 commands can be used together to change MATLAB desktop layout. However, using these commands are risky and one might override default MATLAB parameters. This may corrupt the MATLAB environment. The commands are provided as follows:
1. The following command is used to obtain the desktop object using Java:
>> desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
2. This command saves the current layout:
>> desktop.saveLayout( 'save_layout_name' );
where save_layout_name is the name of the current layout to be saved. Once saved, the custom layout can be viewed or deleted through the 'Layout' button on the MATLAB desktop.
3. The command to load (or restore) a layout is as given:
>> desktop.restoreLayout( 'load_layout_name')
where load_layout_name is the name of the custom layout that you want to load.
Regards,
Shamim
  1 comentario
James Johnson
James Johnson el 20 de Oct. de 2020
When I upgraded to the next MATLAB the issue went away and it correctly loaded the last layout. Previously it was not loading the last layout.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by