Increase the size of MATLAB logo inside Simulink block

11 visualizaciones (últimos 30 días)
Sania Gul
Sania Gul el 16 de Feb. de 2025
Comentada: Sania Gul el 19 de Feb. de 2025
I want to increase the Matlab logo size inside the RL agent block and the size of 1/z inside the unit delay block but increasing the FOnt size is not working for them? what should I do?
  2 comentarios
Abhishek
Abhishek el 18 de Feb. de 2025
Hi @Sania Gul, can you please specify which version of Simulink are you using?

Iniciar sesión para comentar.

Respuesta aceptada

Ishaan
Ishaan el 19 de Feb. de 2025
Editada: Ishaan el 19 de Feb. de 2025
Hey,
I noticed that you intend to make the icons of the blocks bigger.
While you can’t change this setting from preferences, there are a few workarounds that can help you make the icons larger, like:
  1. You can zoom into the canvas (by scrolling) which will increase the icon size of the blocks.
  2. Embed the block into a mask and set the icon of the mask using text function (in drawing commands) or the graphical editor.
While using the text command, use parameters in the following way to control the font size:
text(0.5,0.5,'{\fontsize{20}1/z}', horizontalAlignment = 'center', verticalAlignment = 'middle', texmode='on');
Note: Select "icon units" as "normalized" from the pane on the right to center the text.
For further information on the text formatting, please refer to this guide:
Hope it helps.

Más respuestas (2)

Adarsh
Adarsh el 19 de Feb. de 2025
I see that you are aiming to increase the size of the built-in MATLAB logo/icon on the built-in Simulink blocks. However, Simulink does not provide a direct option for modification of the built-in logo on the blocks through the Simulink tool strip or the block properties.
One of the workarounds that I have found is, you can create a new mask for a built-in Simulink block and add an icon image for the block and apply. This can be done by right clicking on the block for which the icon has to be changed then navigate to Mask > Create Mask and then select Icon tab in the Mask Editor and add an image container to the canvas and then set the image path and in the Render tab inside Icon Properties set Resize to “On” and Scale On Resize to “On”.
You can also add text as a mask by adding the text container to the canvas and type the required text, and modify the font size property in Design Tab inside Text Properties and then set the Icon Properties set Resizeto “On” and Scale On Resize to “On” in the Render tab.
While following this approach make sure the current mode of design in Mask Editor is set to “Graphical” instead of “Drawing Commands” as shown in the image below:
For more details on how to create and edit block mask icon, the following documentation links can be referred:
  1. https://www.mathworks.com/help/simulink/ug/create-block-mask-icon-example.html
  2. https://www.mathworks.com/help/simulink/ug/create-block-icon.html
  3. https://www.mathworks.com/help/simulink/gui/mask-editor-overview.html
Hope this resolves the issue.

Spruha
Spruha el 19 de Feb. de 2025
Hi Sania,
In Simulink, the appearance of certain elements, such as the MATLAB logo inside the “MATLAB function block”, the 1/z in the “Unit Delay block ”, or any logo in a Simulink block is typically predefined and not directly adjustable through font size settings. Font size is used to control the size of block names.
However, you can try creating custom blocks (Subsystem, Mask). This gives full control over the appearance, including the size of any text or logos.
Steps for creating subsystem:
  • Select the components to include in the subsystem.
  • Use the shortcut CTRL + G to create a subsystem.
Steps for adding Image/Icon:
1. Subsystem:
Add Image:
  • Locate the subsystem block in the Simulink toolstrip and find the 'add image' option.
  • Select your desired image.
  • Specify the size and position of the image.
2. Mask:
Create a Mask
  • Right-click on the subsystem.
  • Navigate to Mask > Create Mask.
Mask Editor:
  • Go to the Icon tab in Mask editor window.
  • Use the ‘browse image file’ option to select the image.
  • Specify the desired height and width for the image.
For more information on subsystems, you may refer to the following documentation :
For more information on creating a Mask, you may refer to the following videos :

Categorías

Más información sobre Interactive Model Editing 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