Change only one port label without having to rewrite all the mask
조회 수: 18 (최근 30일)
이전 댓글 표시
Hello everyone,
I need some help to find a way to change the port label of only one input of a masked system and don't have to rewrite all the maskdisplay.
my boss/teacher want that I design a masked system which will be capable to change dynamically the color of the input port based on the input data choosen by user. My usual way to do that it is by this instruction:
set_param(gcb, 'MaskDisplay', '.....')
which is fair for a number of limited dynamic input port, but for more then 4 it is impossible, because I need to consider all the possible combinations for the input ports. for example for 5 input ports, which can be either red or green I have to write 64 if conditions
red red red red red red red red red green red red red green red red red red green green .........................
set_param(gcb, 'MaskDisplay', 'disp(''ITG_R''), color(''black''), port_label(''input'',1,''\bf{\equiv> In}'',''texmode'',''on''), color(''red''), port_label(''input'',2,''\bf{\equiv> Ti}'',''texmode'', ''on''), color(''black''), port_label(''input'',3,''\bf{\rightarrow Tc}'',''texmode'', ''on''), color(''black''), port_label(''input'',4,''\bf{\rightarrow Tv}'',''texmode'', ''on''), color(''black''), port_label(''input'',5,''\bf{\rightarrow Hlt}'',''texmode'', ''on''), color(''black''), port_label(''input'',6,''\bf{\rightarrow Ul}'',''texmode'', ''on''), color(''black''), port_label(''input'',7,''\bf{\rightarrow Ll}'',''texmode'', ''on''), color(''green''), port_label(''input'',8,''\bf{\rightarrow Per}'',''texmode'', ''on''), color(''red'') port_label(''output'',1,''\bf{Re \equiv>}'',''texmode'', ''on''), color(''black''), port_label(''output'',2,''\bf{Ula \rightarrow}'',''texmode'', ''on''), color(''black''), port_label(''output'',3,''\bf{Lla \rightarrow}'',''texmode'', ''on''), color(''black''), port_label(''output'',4,''\bf{Err \rightarrow}'',''texmode'', ''on'') ')
So to modify just a label of a port I have to rewrite all the maskdisplay or there is another way
thanks in advance
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!