Change Constant Block's Value's Font

I am trying to change a constant block's values' font. Specifically, the value as shown inside the block.

 採用された回答

Raghunathraju
Raghunathraju 2023 年 3 月 29 日

0 投票

Hi Richard,
You can’t change the font of the value in Constant block, instead you can try the following:
Make a mask for a given constant block using the CTRL-M keyboard shortcut or by giving a right click on the block and then select Mask -> Create Mask.
  1. Go to "Icon & Ports tab"
  2. Go the section "Icon Drawing Commands”.
  3. Enter the required text as input to "disp" function (example:disp(5))
  4. Give a right click on context menu option
  5. Go to format, select Font style
You should now be able to change the block format like you can with other blocks.

3 件のコメント

RIchard
RIchard 2023 年 3 月 29 日
Is it possible that this is controlled by something inside matlab itself? I have a screenshot from 2016b where the font has been changed. I know this was mutable, without a mask, as I had to write a small script that changed the shape of the block based on the internal character count. To make that work correctly, I needed to have a monospaced font inside the block.
Raghunathraju
Raghunathraju 2023 年 4 月 3 日
Hi Richard
The feature you were asking about is not supported in the current version .Instead you can follow the steps mentioned to mask the block for changing the font , but you will not be able to change the font of the value in the block directly as you were able to do in R2016b.
RIchard
RIchard 2023 年 4 月 3 日
Do you know if that feature will come back?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgrammatic Model Editing についてさらに検索

製品

リリース

R2020a

質問済み:

2023 年 3 月 28 日

コメント済み:

2023 年 4 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by