Can I use subscript (x_1) to name/label simulink blocks and signals?
Show older comments
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)
Azzi Abdelmalek
on 8 Feb 2013
Edited: Azzi Abdelmalek
on 8 Feb 2013
Do you mean
sprintf('blockname%d',10)
%or
sprintf('blockname%s','sometext')
2 Comments
Azzi Abdelmalek
on 8 Feb 2013
Edited: Azzi Abdelmalek
on 8 Feb 2013
idx=10
sprintf('x_%d',idx)
%or
s='x';
idx=1;
out=sprintf('%s_%d',s,idx)
Categories
Find more on String in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!