Can I use subscript (x_1) to name/label simulink blocks and signals?

Hi :)
I have been trying to name the signals in my model by using 'signal properties' -> 'signal name'. But it was not possible to use any subscripts.
Is there a way to name/label a signal 'x_{1}' or 'y_{someText}'? (And have the part in brackets converted to subscript)
I would also like to use subscript in the text that appears in a (masked) block icon that I created. I tried using the Mask -> Edit Mask -> 'Icon Drawing Commands'field, where I entered "display('Block_{a}')" but that does not produce the desired result.
Does anybody have a solution or a hint for me?
Thanks a lot!
Fabian

Answers (1)

Do you mean
sprintf('blockname%d',10)
%or
sprintf('blockname%s','sometext')

2 Comments

I am afraid this is not exactly what I am looking for. It does produce text but that text has no subscript. It would be great to have a letter or word with an index like x_i for example. But thank you anyways!
idx=10
sprintf('x_%d',idx)
%or
s='x';
idx=1;
out=sprintf('%s_%d',s,idx)

Sign in to comment.

Products

Asked:

on 8 Feb 2013

Community Treasure Hunt

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

Start Hunting!